forked from qt-creator/qt-creator
Core: Fix segfault with -presentationMode
Change-Id: I5db01695fd6af338348994bed7498a3d4c7676ea Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -95,6 +95,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
|||||||
QString themeName = QLatin1String("default");
|
QString themeName = QLatin1String("default");
|
||||||
QColor overrideColor;
|
QColor overrideColor;
|
||||||
bool overrideTheme = false;
|
bool overrideTheme = false;
|
||||||
|
bool presentationMode = false;
|
||||||
|
|
||||||
for (int i = 0; i < arguments.size(); ++i) {
|
for (int i = 0; i < arguments.size(); ++i) {
|
||||||
if (arguments.at(i) == QLatin1String("-color")) {
|
if (arguments.at(i) == QLatin1String("-color")) {
|
||||||
@@ -103,7 +104,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
|||||||
i++; // skip the argument
|
i++; // skip the argument
|
||||||
}
|
}
|
||||||
if (arguments.at(i) == QLatin1String("-presentationMode"))
|
if (arguments.at(i) == QLatin1String("-presentationMode"))
|
||||||
ActionManager::setPresentationModeEnabled(true);
|
presentationMode = true;
|
||||||
if (arguments.at(i) == QLatin1String("-theme")) {
|
if (arguments.at(i) == QLatin1String("-theme")) {
|
||||||
overrideTheme = true;
|
overrideTheme = true;
|
||||||
themeName = arguments.at(i + 1);
|
themeName = arguments.at(i + 1);
|
||||||
@@ -137,6 +138,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
|||||||
// defer creation of these widgets until here,
|
// defer creation of these widgets until here,
|
||||||
// because they need a valid theme set
|
// because they need a valid theme set
|
||||||
m_mainWindow = new MainWindow;
|
m_mainWindow = new MainWindow;
|
||||||
|
ActionManager::setPresentationModeEnabled(presentationMode);
|
||||||
m_findPlugin = new FindPlugin;
|
m_findPlugin = new FindPlugin;
|
||||||
m_locator = new Locator;
|
m_locator = new Locator;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user