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

@ -43,6 +43,6 @@ Install the dependencies from Github:
git clone <TODO>
cd harmonyqml
qmake && make && sudo make install
qmake harmonyqml.pro && make && sudo make install
After this if no errors happened, run `harmonyqml`.

View File

@ -129,6 +129,7 @@
- Links preview
- Client improvements
- Check if username exists on login screen
- `pyotherside.atexit()`
- Logout previous session if adding an account that's already connected
- Image provider: on failed conversion, way to show a "broken image" thumb?

View File

@ -69,5 +69,5 @@ for(file, $$list($$glob_filenames(*.py))) {
}
QMAKE_CLEAN *= $$MOC_DIR $$OBJECTS_DIR $$RCC_DIR $$PYCACHE_DIRS $$QRC_FILE
QMAKE_CLEAN *= $$BUILD_DIR Makefile .qmake.stash
QMAKE_CLEAN *= $$BUILD_DIR $$TARGET Makefile .qmake.stash
QMAKE_CLEAN *= $$glob_filenames(*.pyc, *.qmlc, *.jsc, *.egg-info)

View File

@ -10,6 +10,8 @@ export QT_QPA_PLATFORM=xcb
CFG='dev no_embedded'
qmake harmonyqml.pro CONFIG+="$CFG" && make
while true; do
find src harmonyqml.pro -type f |
entr -cdnr sh -c \

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.")
}