diff --git a/src/app/main.cpp b/src/app/main.cpp index 99714241d0b..c08049f4c96 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -306,6 +306,9 @@ int main(int argc, char **argv) // Do this after the event loop has started QTimer::singleShot(100, &pluginManager, SLOT(startTests())); - return app.exec(); + + int ret = app.exec(); + pluginManager.shutdown(); + return ret; } diff --git a/src/libs/extensionsystem/iplugin.cpp b/src/libs/extensionsystem/iplugin.cpp index 57fc9d9e86b..d5cfdfd61d9 100644 --- a/src/libs/extensionsystem/iplugin.cpp +++ b/src/libs/extensionsystem/iplugin.cpp @@ -217,36 +217,62 @@ /*! \fn bool IPlugin::initialize(const QStringList &arguments, QString *errorString) - Called after the plugin has been loaded and the IPlugin instance - has been created. The initialize methods of plugins that depend + \brief Called after the plugin has been loaded and the IPlugin instance + has been created. + + The initialize methods of plugins that depend on this plugin are called after the initialize method of this plugin has been called. Plugins should initialize their internal state in this method. Returns if initialization of successful. If it wasn't successful, the \a errorString should be set to a user-readable message describing the reason. + \sa extensionsInitialized() */ /*! \fn void IPlugin::extensionsInitialized() - Called after the IPlugin::initialize() method has been called, + \brief Called after the IPlugin::initialize() method has been called, and after both the IPlugin::initialize() and IPlugin::extensionsInitialized() methods of plugins that depend on this plugin have been called. + In this method, the plugin can assume that plugins that depend on this plugin are fully 'up and running'. It is a good place to look in the plugin manager's object pool for objects that have been provided by dependent plugins. + \sa initialize() */ /*! - \fn void IPlugin::aboutToShutdown() - Called during a shutdown sequence in the same order as initialization + \fn IPlugin::ShutdownFlag IPlugin::aboutToShutdown() + \brief Called during a shutdown sequence in the same order as initialization before the plugins get deleted in reverse order. - This method can be used to optimize the shutdown down, e.g. to - disconnect from the PluginManager::aboutToRemoveObject() signal - if getting the signal (and probably doing lots of stuff to update - the internal and visible state) doesn't make sense during shutdown. + + This method should be used to disconnect from other plugins, + hide all UI, and optimize shutdown in general. + If a plugin needs to delay the real shutdown for a while, for example if + it needs to wait for external processes to finish for a clean shutdown, + the plugin can return IPlugin::AsynchronousShutdown from this method. This + will keep the main event loop running after the aboutToShutdown() sequence + has finished, until all plugins requesting AsynchronousShutdown have sent + the asynchronousShutdownFinished() signal. + + The default implementation of this method does nothing and returns + IPlugin::SynchronousShutdown. + + Returns IPlugin::AsynchronousShutdown if the plugin needs to perform + asynchonous actions before performing the shutdown. + + \sa asynchronousShutdownFinished() +*/ + +/*! + \fn void IPlugin::asynchronousShutdownFinished() + Sent by the plugin implementation after a asynchronous shutdown + is ready to proceed with the shutdown sequence. + + \sa aboutToShutdown() */ using namespace ExtensionSystem; diff --git a/src/libs/extensionsystem/iplugin.h b/src/libs/extensionsystem/iplugin.h index 889daecd736..d4125723438 100644 --- a/src/libs/extensionsystem/iplugin.h +++ b/src/libs/extensionsystem/iplugin.h @@ -49,12 +49,17 @@ class EXTENSIONSYSTEM_EXPORT IPlugin : public QObject Q_OBJECT public: + enum ShutdownFlag { + SynchronousShutdown, + AsynchronousShutdown + }; + IPlugin(); virtual ~IPlugin(); virtual bool initialize(const QStringList &arguments, QString *errorString) = 0; virtual void extensionsInitialized() = 0; - virtual void aboutToShutdown() { } + virtual ShutdownFlag aboutToShutdown() { return SynchronousShutdown; } virtual void remoteCommand(const QStringList & /* options */, const QStringList & /* arguments */) { } PluginSpec *pluginSpec() const; @@ -63,6 +68,9 @@ public: void addAutoReleasedObject(QObject *obj); void removeObject(QObject *obj); +signals: + void asynchronousShutdownFinished(); + private: Internal::IPluginPrivate *d; diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index f7b41b67746..37dd4daeb9a 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -253,6 +253,16 @@ void PluginManager::loadPlugins() return d->loadPlugins(); } +/*! + \fn void PluginManager::shutdown() + Shuts down and deletes all plugins. +*/ +void PluginManager::shutdown() +{ + d->shutdown(); +} + + /*! \fn QStringList PluginManager::pluginPaths() const The list of paths were the plugin manager searches for plugins. @@ -628,20 +638,21 @@ PluginManagerPrivate::PluginManagerPrivate(PluginManager *pluginManager) : { } + /*! \fn PluginManagerPrivate::~PluginManagerPrivate() \internal */ PluginManagerPrivate::~PluginManagerPrivate() { - stopAll(); qDeleteAll(pluginSpecs); qDeleteAll(pluginCategories); - if (!allObjects.isEmpty()) { - qDebug() << "There are" << allObjects.size() << "objects left in the plugin manager pool: " << allObjects; - } } +/*! + \fn void PluginManagerPrivate::writeSettings() + \internal +*/ void PluginManagerPrivate::writeSettings() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, @@ -660,6 +671,10 @@ void PluginManagerPrivate::writeSettings() settings.setValue(QLatin1String(C_FORCEENABLED_PLUGINS), tempForceEnabledPlugins); } +/*! + \fn void PluginManagerPrivate::loadSettings() + \internal +*/ void PluginManagerPrivate::loadSettings() { const QSettings settings(QSettings::IniFormat, QSettings::UserScope, @@ -669,12 +684,25 @@ void PluginManagerPrivate::loadSettings() forceEnabledPlugins = settings.value(QLatin1String(C_FORCEENABLED_PLUGINS)).toStringList(); } +/*! + \fn void PluginManagerPrivate::stopAll() + \internal +*/ void PluginManagerPrivate::stopAll() { QList queue = loadQueue(); foreach (PluginSpec *spec, queue) { loadPlugin(spec, PluginSpec::Stopped); } +} + +/*! + \fn void PluginManagerPrivate::deleteAll() + \internal +*/ +void PluginManagerPrivate::deleteAll() +{ + QList queue = loadQueue(); QListIterator it(queue); it.toBack(); while (it.hasPrevious()) { @@ -759,6 +787,36 @@ void PluginManagerPrivate::loadPlugins() emit q->pluginsChanged(); } +/*! + \fn void PluginManagerPrivate::shutdown() + \internal +*/ +void PluginManagerPrivate::shutdown() +{ + stopAll(); + if (!asynchronousPlugins.isEmpty()) { + shutdownEventLoop = new QEventLoop; + shutdownEventLoop->exec(); + } + deleteAll(); + if (!allObjects.isEmpty()) { + qDebug() << "There are" << allObjects.size() << "objects left in the plugin manager pool: " << allObjects; + } +} + +/*! + \fn void PluginManagerPrivate::asyncShutdownFinished() + \internal +*/ +void PluginManagerPrivate::asyncShutdownFinished() +{ + IPlugin *plugin = qobject_cast(sender()); + Q_ASSERT(plugin); + asynchronousPlugins.removeAll(plugin->pluginSpec()); + if (asynchronousPlugins.isEmpty()) + shutdownEventLoop->exit(); +} + /*! \fn void PluginManagerPrivate::loadQueue() \internal @@ -836,7 +894,9 @@ void PluginManagerPrivate::loadPlugin(PluginSpec *spec, PluginSpec::State destSt profilingReport("delete", spec); spec->d->kill(); + profilingReport("stop", spec); - spec->d->stop(); + if (spec->d->stop() == IPlugin::AsynchronousShutdown) { + asynchronousPlugins << spec; + connect(spec->plugin(), SIGNAL(asynchronousShutdownFinished()), + this, SLOT(asyncShutdownFinished())); + } profilingReport(" loadQueue(); void loadPlugins(); + void shutdown(); QStringList pluginPaths() const; void setPluginPaths(const QStringList &paths); QList plugins() const; diff --git a/src/libs/extensionsystem/pluginmanager_p.h b/src/libs/extensionsystem/pluginmanager_p.h index fe7ed3da44c..7544d629d3a 100644 --- a/src/libs/extensionsystem/pluginmanager_p.h +++ b/src/libs/extensionsystem/pluginmanager_p.h @@ -37,6 +37,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE class QTime; @@ -51,8 +52,9 @@ namespace Internal { class PluginSpecPrivate; -class EXTENSIONSYSTEM_EXPORT PluginManagerPrivate +class EXTENSIONSYSTEM_EXPORT PluginManagerPrivate : QObject { + Q_OBJECT public: PluginManagerPrivate(PluginManager *pluginManager); virtual ~PluginManagerPrivate(); @@ -63,6 +65,7 @@ public: // Plugin operations void loadPlugins(); + void shutdown(); void setPluginPaths(const QStringList &paths); QList loadQueue(); void loadPlugin(PluginSpec *spec, PluginSpec::State destState); @@ -81,6 +84,8 @@ public: QList allObjects; // ### make this a QList > > ? QStringList disabledPlugins; QStringList forceEnabledPlugins; + QList asynchronousPlugins; // plugins that have requested async shutdown + QEventLoop *shutdownEventLoop; // used for async shutdown QStringList arguments; QScopedPointer m_profileTimer; @@ -94,6 +99,10 @@ public: // used by tests static PluginSpec *createSpec(); static PluginSpecPrivate *privateSpec(PluginSpec *spec); + +private slots: + void asyncShutdownFinished(); + private: PluginCollection *defaultCollection; PluginManager *q; @@ -103,6 +112,7 @@ private: QList &queue, QList &circularityCheckQueue); void stopAll(); + void deleteAll(); }; } // namespace Internal diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp index 4bc231c4f3f..709785dd681 100644 --- a/src/libs/extensionsystem/pluginspec.cpp +++ b/src/libs/extensionsystem/pluginspec.cpp @@ -959,12 +959,12 @@ bool PluginSpecPrivate::initializeExtensions() \fn bool PluginSpecPrivate::stop() \internal */ -void PluginSpecPrivate::stop() +IPlugin::ShutdownFlag PluginSpecPrivate::stop() { if (!plugin) - return; - plugin->aboutToShutdown(); + return IPlugin::SynchronousShutdown; state = PluginSpec::Stopped; + return plugin->aboutToShutdown(); } /*! diff --git a/src/libs/extensionsystem/pluginspec_p.h b/src/libs/extensionsystem/pluginspec_p.h index e8c8c9443aa..5048dc13b30 100644 --- a/src/libs/extensionsystem/pluginspec_p.h +++ b/src/libs/extensionsystem/pluginspec_p.h @@ -31,6 +31,7 @@ #define PLUGINSPEC_P_H #include "pluginspec.h" +#include "iplugin.h" #include #include @@ -56,7 +57,7 @@ public: bool loadLibrary(); bool initializePlugin(); bool initializeExtensions(); - void stop(); + IPlugin::ShutdownFlag stop(); void kill(); QString name; diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index 8c7e9bede3c..f589e8703c1 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -108,9 +108,10 @@ void CorePlugin::fileOpenRequest(const QString &f) remoteCommand(QStringList(), QStringList(f)); } -void CorePlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown() { m_mainWindow->aboutToShutdown(); + return SynchronousShutdown; } Q_EXPORT_PLUGIN(CorePlugin) diff --git a/src/plugins/coreplugin/coreplugin.h b/src/plugins/coreplugin/coreplugin.h index bd602550478..af0f85f94b0 100644 --- a/src/plugins/coreplugin/coreplugin.h +++ b/src/plugins/coreplugin/coreplugin.h @@ -49,7 +49,7 @@ public: virtual bool initialize(const QStringList &arguments, QString *errorMessage = 0); virtual void extensionsInitialized(); - virtual void aboutToShutdown(); + virtual ShutdownFlag aboutToShutdown(); virtual void remoteCommand(const QStringList & /* options */, const QStringList &args); public slots: diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index e2edbfce8b5..4982e0ec466 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -238,7 +238,6 @@ void MainWindow::setOverrideColor(const QColor &color) MainWindow::~MainWindow() { - hide(); ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); pm->removeObject(m_shortcutSettings); pm->removeObject(m_generalSettings); @@ -1134,6 +1133,7 @@ void MainWindow::aboutToShutdown() disconnect(QApplication::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)), this, SLOT(updateFocusWidget(QWidget*,QWidget*))); m_activeContext = 0; + hide(); } static const char *settingsGroup = "MainWindow"; diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 626f1f1b3a6..0756b1b77dc 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -144,7 +144,7 @@ void CodepasterPlugin::extensionsInitialized() { } -void CodepasterPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag CodepasterPlugin::aboutToShutdown() { // Delete temporary, fetched files foreach(const QString &fetchedSnippet, m_fetchedSnippets) { @@ -152,6 +152,7 @@ void CodepasterPlugin::aboutToShutdown() if (file.exists()) file.remove(); } + return SynchronousShutdown; } void CodepasterPlugin::postEditor() diff --git a/src/plugins/cpaster/cpasterplugin.h b/src/plugins/cpaster/cpasterplugin.h index b75158b0c9a..6dcc8a902b6 100644 --- a/src/plugins/cpaster/cpasterplugin.h +++ b/src/plugins/cpaster/cpasterplugin.h @@ -55,7 +55,7 @@ public: virtual bool initialize(const QStringList &arguments, QString *error_message); virtual void extensionsInitialized(); - virtual void aboutToShutdown(); + virtual ShutdownFlag aboutToShutdown(); public slots: void postEditor(); diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index f0c0b68fbdd..2b9e980f827 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -320,9 +320,10 @@ void CppPlugin::extensionsInitialized() { } -void CppPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag CppPlugin::aboutToShutdown() { writeSettings(); + return SynchronousShutdown; } void CppPlugin::switchDeclarationDefinition() diff --git a/src/plugins/cppeditor/cppplugin.h b/src/plugins/cppeditor/cppplugin.h index 6b5a191c0bd..517da5c2f95 100644 --- a/src/plugins/cppeditor/cppplugin.h +++ b/src/plugins/cppeditor/cppplugin.h @@ -60,7 +60,7 @@ public: bool initialize(const QStringList &arguments, QString *error_message = 0); void extensionsInitialized(); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); // Connect editor to settings changed signals. void initializeEditor(CPPEditor *editor); diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index dcff150363d..9b84e8012ba 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -160,8 +160,9 @@ void CppToolsPlugin::extensionsInitialized() m_modelManager->setHeaderSuffixes(mimeType.suffixes()); } -void CppToolsPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag CppToolsPlugin::aboutToShutdown() { + return SynchronousShutdown; } void CppToolsPlugin::switchHeaderSource() diff --git a/src/plugins/cpptools/cpptoolsplugin.h b/src/plugins/cpptools/cpptoolsplugin.h index 97e95b017fa..532662b2aec 100644 --- a/src/plugins/cpptools/cpptoolsplugin.h +++ b/src/plugins/cpptools/cpptoolsplugin.h @@ -65,7 +65,7 @@ public: bool initialize(const QStringList &arguments, QString *error_message); void extensionsInitialized(); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); CppModelManager *cppModelManager() { return m_modelManager; } QString correspondingHeaderOrSource(const QString &fileName) const; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 7e847eab484..c1b2a7fbcbb 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2480,13 +2480,14 @@ void DebuggerPlugin::clearCppCodeModelSnapshot() d->m_codeModelSnapshot = CPlusPlus::Snapshot(); } -void DebuggerPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown() { writeSettings(); if (d->m_uiSwitcher) d->m_uiSwitcher->aboutToShutdown(); //if (d->m_engine) // d->m_engine->shutdown(); + return SynchronousShutdown; } void DebuggerPlugin::showMessage(const QString &msg, int channel, int timeout) diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h index d3fadff4c6c..b183c3c855f 100644 --- a/src/plugins/debugger/debuggerplugin.h +++ b/src/plugins/debugger/debuggerplugin.h @@ -121,7 +121,7 @@ private: friend class Internal::DebuggerListener ; bool initialize(const QStringList &arguments, QString *errorMessage); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); void extensionsInitialized(); void remoteCommand(const QStringList &options, const QStringList &arguments); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 0ecdcdc4fa9..d36a2863aeb 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1175,9 +1175,10 @@ bool FakeVimPlugin::initialize(const QStringList &arguments, QString *errorMessa return d->initialize(); } -void FakeVimPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag FakeVimPlugin::aboutToShutdown() { d->aboutToShutdown(); + return SynchronousShutdown; } void FakeVimPlugin::extensionsInitialized() diff --git a/src/plugins/fakevim/fakevimplugin.h b/src/plugins/fakevim/fakevimplugin.h index a40bb9a9f28..b9e38375e69 100644 --- a/src/plugins/fakevim/fakevimplugin.h +++ b/src/plugins/fakevim/fakevimplugin.h @@ -50,7 +50,7 @@ public: private: // implementation of ExtensionSystem::IPlugin bool initialize(const QStringList &arguments, QString *error_message); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); void extensionsInitialized(); private: diff --git a/src/plugins/find/findplugin.cpp b/src/plugins/find/findplugin.cpp index 7e1e14669ae..96e68705dd1 100644 --- a/src/plugins/find/findplugin.cpp +++ b/src/plugins/find/findplugin.cpp @@ -143,12 +143,13 @@ void FindPlugin::extensionsInitialized() readSettings(); } -void FindPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag FindPlugin::aboutToShutdown() { d->m_findToolBar->setVisible(false); d->m_findToolBar->setParent(0); d->m_currentDocumentFind->removeConnections(); writeSettings(); + return SynchronousShutdown; } void FindPlugin::filterChanged() diff --git a/src/plugins/find/findplugin.h b/src/plugins/find/findplugin.h index ef0e0d73561..d643be94fca 100644 --- a/src/plugins/find/findplugin.h +++ b/src/plugins/find/findplugin.h @@ -67,7 +67,7 @@ public: // IPlugin bool initialize(const QStringList &arguments, QString *error_message); void extensionsInitialized(); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); QTextDocument::FindFlags findFlags() const; void updateFindCompletion(const QString &text); diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index e82b87ae695..2bbd86011b6 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -338,10 +338,11 @@ void HelpPlugin::extensionsInitialized() helpManager->registerDocumentation(filesToRegister); } -void HelpPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag HelpPlugin::aboutToShutdown() { if (m_sideBar) m_sideBar->saveSettings(m_core->settings(), QLatin1String("HelpSideBar")); + return SynchronousShutdown; } void HelpPlugin::setupUi() diff --git a/src/plugins/help/helpplugin.h b/src/plugins/help/helpplugin.h index d7927fc221c..b97b61c2b62 100644 --- a/src/plugins/help/helpplugin.h +++ b/src/plugins/help/helpplugin.h @@ -70,7 +70,7 @@ public: bool initialize(const QStringList &arguments, QString *error_message); void extensionsInitialized(); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); private slots: void modeChanged(Core::IMode *mode); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index a1f6f8aa8c4..1351bf96e25 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -944,12 +944,13 @@ void ProjectExplorerPlugin::extensionsInitialized() d->m_buildManager->extensionsInitialized(); } -void ProjectExplorerPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag ProjectExplorerPlugin::aboutToShutdown() { d->m_proWindow->aboutToShutdown(); // disconnect from session d->m_session->clear(); d->m_projectsMode = 0; // d->m_proWindow->saveConfigChanges(); + return SynchronousShutdown; } void ProjectExplorerPlugin::newProject() diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index 2b767b3d3f9..973dc53535a 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -100,7 +100,7 @@ public: //PluginInterface bool initialize(const QStringList &arguments, QString *error_message); void extensionsInitialized(); - void aboutToShutdown(); + ShutdownFlag aboutToShutdown(); void setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes); Internal::ProjectExplorerSettings projectExplorerSettings() const; diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.cpp b/src/plugins/qmlinspector/qmlinspectorplugin.cpp index 92b18ca66ea..6441ab22ac7 100644 --- a/src/plugins/qmlinspector/qmlinspectorplugin.cpp +++ b/src/plugins/qmlinspector/qmlinspectorplugin.cpp @@ -84,9 +84,10 @@ QmlInspectorPlugin::~QmlInspectorPlugin() m_inspector = 0; } -void QmlInspectorPlugin::aboutToShutdown() +ExtensionSystem::IPlugin::ShutdownFlag QmlInspectorPlugin::aboutToShutdown() { m_inspector->shutdown(); + return SynchronousShutdown; } bool QmlInspectorPlugin::initialize(const QStringList &arguments, QString *errorString) diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.h b/src/plugins/qmlinspector/qmlinspectorplugin.h index e40d714007a..7ef5693b00d 100644 --- a/src/plugins/qmlinspector/qmlinspectorplugin.h +++ b/src/plugins/qmlinspector/qmlinspectorplugin.h @@ -58,7 +58,7 @@ public: virtual bool initialize(const QStringList &arguments, QString *errorString); virtual void extensionsInitialized(); - virtual void aboutToShutdown(); + virtual ShutdownFlag aboutToShutdown(); public slots: void activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode);