|
41 | 41 | #include <QScrollBar> |
42 | 42 | #include <QLocale> |
43 | 43 | #include <QTranslator> |
| 44 | +#include <QList> |
44 | 45 |
|
45 | 46 | #ifdef _WIN32 |
46 | 47 | #include <windows.h> |
|
51 | 52 | // globally accessible variables |
52 | 53 | bool DoxygenWizard::debugFlag = false; |
53 | 54 | QString DoxygenWizard::langCode; |
| 55 | +static QList<QString> newArgs; |
54 | 56 |
|
55 | 57 | const int messageTimeout = 5000; //!< status bar message timeout in milliseconds. |
56 | 58 |
|
@@ -469,7 +471,7 @@ void MainWindow::switchLanguage() |
469 | 471 | setLanguage(langCode); |
470 | 472 | saveSettings(); |
471 | 473 | qApp->quit(); |
472 | | - QProcess::startDetached(qApp->arguments()[0], qApp->arguments().mid(1)); |
| 474 | + QProcess::startDetached(qApp->arguments()[0], newArgs); |
473 | 475 | } |
474 | 476 | } |
475 | 477 | } |
@@ -962,6 +964,7 @@ int main(int argc,char **argv) |
962 | 964 |
|
963 | 965 | QApplication a(argc,argv); |
964 | 966 |
|
| 967 | + |
965 | 968 | int optInd=1; |
966 | 969 | bool langSet = false; |
967 | 970 | bool dumpFlag = false; |
@@ -1000,6 +1003,7 @@ int main(int argc,char **argv) |
1000 | 1003 | else if (!qstrcmp(argv[optInd],"--debug")) |
1001 | 1004 | { |
1002 | 1005 | DoxygenWizard::debugFlag = true; |
| 1006 | + newArgs.push_back(QString::fromLatin1(argv[optInd])); |
1003 | 1007 | } |
1004 | 1008 | else if (!qstrcmp(argv[optInd],"--language")) |
1005 | 1009 | { |
@@ -1064,6 +1068,7 @@ int main(int argc,char **argv) |
1064 | 1068 | } |
1065 | 1069 | if (optInd+1==argc && argv[argc-1][0]!='-') // name of config file as an argument |
1066 | 1070 | { |
| 1071 | + newArgs.push_back(QString::fromLatin1(argv[argc-1])); |
1067 | 1072 | main.loadConfigFromFile(QString::fromLocal8Bit(argv[argc-1])); |
1068 | 1073 | } |
1069 | 1074 | if (dumpFlag) |
|
0 commit comments