Make qrc path aliases the same as filesystem ones
This commit is contained in:
		| @@ -66,8 +66,7 @@ file_content += '<RCC version="1.0">' | ||||
| file_content += '<qresource prefix="/">' | ||||
|  | ||||
| for(file, RESOURCE_FILES) { | ||||
|     alias = $$replace(file, src/, '') | ||||
|     file_content += '    <file alias="$$alias">../$$file</file>' | ||||
|     file_content += '    <file alias="$$file">../$$file</file>' | ||||
| } | ||||
|  | ||||
| file_content += '</qresource>' | ||||
|   | ||||
| @@ -23,11 +23,11 @@ int main(int argc, char *argv[]) { | ||||
|     objectContext->setContextProperty("debugMode", false); | ||||
| #endif | ||||
|  | ||||
|     QFileInfo qrcPath(":/qml/Window.qml"); | ||||
|     QFileInfo qrcPath(":src/qml/Window.qml"); | ||||
|  | ||||
|     QQmlComponent component( | ||||
|         &engine, | ||||
|         qrcPath.exists() ? "qrc:/qml/Window.qml" : "src/qml/Window.qml" | ||||
|         qrcPath.exists() ? "qrc:/src/qml/Window.qml" : "src/qml/Window.qml" | ||||
|     ); | ||||
|     component.create(objectContext); | ||||
|  | ||||
|   | ||||
| @@ -163,7 +163,7 @@ class Theme(ConfigFile): | ||||
|  | ||||
|  | ||||
|     async def default_data(self) -> str: | ||||
|         async with aiofiles.open("src/themes/Default.qpl", "r") as file: | ||||
|         async with aiofiles.open("src/themes/Default.qpl") as file: | ||||
|             return await file.read() | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -53,7 +53,7 @@ Python { | ||||
|         } | ||||
|  | ||||
|         addImportPath("src") | ||||
|         addImportPath("qrc:/") | ||||
|         addImportPath("qrc:/src") | ||||
|         importNames("python", ["APP"], () => { | ||||
|             loadSettings(() => { | ||||
|                 callCoro("saved_accounts.any_saved", [], any => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	