Fix qrc resources not working

This commit is contained in:
miruka
2019-08-25 15:38:42 -04:00
parent 8ebd7189cc
commit f5e52aed4e
6 changed files with 9 additions and 5 deletions

View File

@@ -23,10 +23,11 @@ int main(int argc, char *argv[]) {
objectContext->setContextProperty("debugMode", false);
#endif
QFileInfo qrcPath(":/qml/Window.qml");
QQmlComponent component(
&engine,
QFileInfo::exists("qrc:/qml/Window.qml") ?
"qrc:/qml/Window.qml" : "src/qml/Window.qml"
qrcPath.exists() ? "qrc:/qml/Window.qml" : "src/qml/Window.qml"
);
component.create(objectContext);

View File

@@ -1,5 +1,5 @@
import "../Base"
HNoticePage {
text: "Select or add a room to start."
text: qsTr("Add or select a room to start.")
}