浏览代码

Only reach for qml under /usr/share when app is installed under /usr

Donald Carr 6 年之前
父节点
当前提交
f5aa0aa5a6
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/main.cpp

+ 1 - 2
src/main.cpp

@@ -110,8 +110,7 @@ void ArtView::populateScreen(QScreen *screen)
 #ifdef COMPILED_RESOURCES
 #ifdef COMPILED_RESOURCES
     qmlPath = "qrc:/qml";
     qmlPath = "qrc:/qml";
 #else
 #else
-    qmlPath = QCoreApplication::applicationDirPath() % "/qml";
-    if (!QDir(qmlPath).exists()) {
+    if (QCoreApplication::applicationDirPath().startsWith("/usr")) {
         qmlPath = "/usr/share/" % qApp->applicationName() % "/qml";
         qmlPath = "/usr/share/" % qApp->applicationName() % "/qml";
     }
     }
 #endif
 #endif