forked from qt-creator/qt-creator
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: con <qtc-committer@nokia.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user