소스 검색

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();