Browse Source

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 years ago
parent
commit
8569997885
1 changed files with 4 additions and 0 deletions
  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();