diff --git a/src/platform/autorun_win.cpp b/src/platform/autorun_win.cpp index 18fa1ba7c..4cb8d9b7a 100644 --- a/src/platform/autorun_win.cpp +++ b/src/platform/autorun_win.cpp @@ -25,7 +25,7 @@ namespace Platform { inline std::wstring currentCommandLine() { - return ("\"" + QApplication::applicationFilePath().replace('/', '\\') + "\" -P \"" + + return ("\"" + QApplication::applicationFilePath().replace('/', '\\') + "\" -p \"" + Settings::getInstance().getCurrentProfile() + "\"").toStdWString(); } diff --git a/src/platform/autorun_xdg.cpp b/src/platform/autorun_xdg.cpp index 99d83e5e0..41391ca04 100644 --- a/src/platform/autorun_xdg.cpp +++ b/src/platform/autorun_xdg.cpp @@ -35,7 +35,7 @@ namespace Platform inline QString currentCommandLine() { - return "\"" + QApplication::applicationFilePath() + "\" -P \"" + + return "\"" + QApplication::applicationFilePath() + "\" -p \"" + Settings::getInstance().getCurrentProfile() + "\""; } } diff --git a/src/widget/form/settings/identityform.cpp b/src/widget/form/settings/identityform.cpp index 6c9d39efb..9197f860e 100644 --- a/src/widget/form/settings/identityform.cpp +++ b/src/widget/form/settings/identityform.cpp @@ -163,7 +163,7 @@ void IdentityForm::onRenameClicked() Settings::getInstance().setAutorun(false); Settings::getInstance().setCurrentProfile(name); if (resetAutorun) - Settings::getInstance().setAutorun(true); // fixes -P flag in autostart command line + Settings::getInstance().setAutorun(true); // fixes -p flag in autostart command line break; } } while (true);