Skip to content
Snippets Groups Projects
Commit 4a4ee5cd authored by Dieter Piringer's avatar Dieter Piringer
Browse files

Core: Fix segfault with -presentationMode


Change-Id: I5db01695fd6af338348994bed7498a3d4c7676ea
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent c43d958e
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
QString themeName = QLatin1String("default");
QColor overrideColor;
bool overrideTheme = false;
bool presentationMode = false;
for (int i = 0; i < arguments.size(); ++i) {
if (arguments.at(i) == QLatin1String("-color")) {
......@@ -103,7 +104,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
i++; // skip the argument
}
if (arguments.at(i) == QLatin1String("-presentationMode"))
ActionManager::setPresentationModeEnabled(true);
presentationMode = true;
if (arguments.at(i) == QLatin1String("-theme")) {
overrideTheme = true;
themeName = arguments.at(i + 1);
......@@ -137,6 +138,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
// defer creation of these widgets until here,
// because they need a valid theme set
m_mainWindow = new MainWindow;
ActionManager::setPresentationModeEnabled(presentationMode);
m_findPlugin = new FindPlugin;
m_locator = new Locator;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment