diff --git a/src/app/main.cpp b/src/app/main.cpp index bf05a8946ec..90eaa719818 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -86,6 +86,7 @@ const char SETTINGS_OPTION[] = "-settingspath"; const char INSTALL_SETTINGS_OPTION[] = "-installsettingspath"; const char TEST_OPTION[] = "-test"; const char STYLE_OPTION[] = "-style"; +const char QML_LITE_DESIGNER_OPTION[] = "-qml-lite-designer"; const char TEMPORARY_CLEAN_SETTINGS1[] = "-temporarycleansettings"; const char TEMPORARY_CLEAN_SETTINGS2[] = "-tcs"; const char PID_OPTION[] = "-pid"; @@ -325,6 +326,7 @@ struct Options QString installSettingsPath; QStringList customPluginPaths; QString uiLanguage; + QString singleAppIdPostfix; // list of arguments that were handled and not passed to the application or plugin manager QStringList preAppArguments; // list of arguments to be passed to the application or plugin manager @@ -373,6 +375,8 @@ Options parseCommandLine(int argc, char *argv[]) options.hasStyleOption = true; if (arg == TEST_OPTION) options.hasTestOption = true; + if (arg == QML_LITE_DESIGNER_OPTION) + options.singleAppIdPostfix = QML_LITE_DESIGNER_OPTION; options.appArguments.push_back(*it); } ++it; @@ -701,9 +705,10 @@ int main(int argc, char **argv) // create a custom Qt message handler that shows messages in a bare bones UI // if creation of the QGuiApplication fails. auto handler = std::make_unique(); - std::unique_ptr - appPtr(SharedTools::createApplication(QLatin1String(Core::Constants::IDE_DISPLAY_NAME), - numberOfArguments, options.appArguments.data())); + const QString singleAppId = QString(Core::Constants::IDE_DISPLAY_NAME) + + options.singleAppIdPostfix; + std::unique_ptr appPtr( + SharedTools::createApplication(singleAppId, numberOfArguments, options.appArguments.data())); handler.reset(); SharedTools::QtSingleApplication &app = *appPtr; QCoreApplication::setApplicationName(Core::Constants::IDE_CASED_ID);