Commit 005b0a9a authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix exit crash when having context help open.



Add a shutdown()-notification to MainWindow and
reset the context in it.

Task-number: 256386
Reviewed-by: default avatarcon <qtc-committer@nokia.com>
parent cc587133
......@@ -96,4 +96,9 @@ void CorePlugin::remoteArgument(const QString& arg)
}
}
void CorePlugin::shutdown()
{
m_mainWindow->shutdown();
}
Q_EXPORT_PLUGIN(CorePlugin)
......@@ -47,8 +47,9 @@ public:
CorePlugin();
~CorePlugin();
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
void extensionsInitialized();
virtual bool initialize(const QStringList &arguments, QString *errorMessage = 0);
virtual void extensionsInitialized();
virtual void shutdown();
public slots:
void remoteArgument(const QString&);
......
......@@ -1081,6 +1081,13 @@ void MainWindow::resetContext()
updateContextObject(0);
}
void MainWindow::shutdown()
{
disconnect(QApplication::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)),
this, SLOT(updateFocusWidget(QWidget*,QWidget*)));
m_activeContext = 0;
}
static const char *settingsGroup = "MainWindow";
static const char *geometryKey = "Geometry";
static const char *colorKey = "Color";
......
......@@ -89,6 +89,7 @@ public:
bool init(QString *errorMessage);
void extensionsInitialized();
void shutdown();
IContext *contextObject(QWidget *widget);
void addContextObject(IContext *contex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment