浏览代码

icon: Do not enforce icon on startup, fixes #622

We enforce the icon onstartup and this has been reported as an issue for people willing to change the application Icon on OSX.

This is only required on Windows.
On OSX this would break ability of user to change the App icon which is made from the SVG version.
We limit setting this window icon to Windows then.
Lionel CHAZALLON 7 年之前
父节点
当前提交
8569997885
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/main.cpp

+ 4 - 0
src/main.cpp

@@ -165,7 +165,11 @@ int main(int argc, char *argv[])
       qputenv("QT_SCALE_FACTOR", scale.toUtf8());
 
     QApplication app(newArgc, newArgv);
+#if Q_OS_WIN
+    // Setting the icon on Windows is necessary but will break user
+    // ability to change icon on OSX
     app.setWindowIcon(QIcon(":/images/icon.png"));
+#endif
 
 #if defined(Q_OS_MAC) && defined(NDEBUG)
     PFMoveToApplicationsFolderIfNecessary();