Commit ca142997 authored by con's avatar con

Rename IPlugin::shutdown --> IPlugin::aboutToShutdown

Discussed-with: hjk
parent 00dac575
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
*/ */
/*! /*!
\fn void IPlugin::shutdown() \fn void IPlugin::aboutToShutdown()
Called during a shutdown sequence in the same order as initialization Called during a shutdown sequence in the same order as initialization
before the plugins get deleted in reverse order. before the plugins get deleted in reverse order.
This method can be used to optimize the shutdown down, e.g. to This method can be used to optimize the shutdown down, e.g. to
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
virtual bool initialize(const QStringList &arguments, QString *errorString) = 0; virtual bool initialize(const QStringList &arguments, QString *errorString) = 0;
virtual void extensionsInitialized() = 0; virtual void extensionsInitialized() = 0;
virtual void shutdown() { } virtual void aboutToShutdown() { }
virtual void remoteCommand(const QStringList & /* options */, const QStringList & /* arguments */) { } virtual void remoteCommand(const QStringList & /* options */, const QStringList & /* arguments */) { }
PluginSpec *pluginSpec() const; PluginSpec *pluginSpec() const;
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
extensionsInitialized has been called. The loading process is extensionsInitialized has been called. The loading process is
complete. complete.
\value Stopped \value Stopped
The plugin has been shut down, i.e. the plugin's IPlugin::shutdown() method has been called. The plugin has been shut down, i.e. the plugin's IPlugin::aboutToShutdown() method has been called.
\value Deleted \value Deleted
The plugin instance has been deleted. The plugin instance has been deleted.
*/ */
...@@ -959,7 +959,7 @@ void PluginSpecPrivate::stop() ...@@ -959,7 +959,7 @@ void PluginSpecPrivate::stop()
{ {
if (!plugin) if (!plugin)
return; return;
plugin->shutdown(); plugin->aboutToShutdown();
state = PluginSpec::Stopped; state = PluginSpec::Stopped;
} }
......
...@@ -110,9 +110,9 @@ void CorePlugin::fileOpenRequest(const QString &f) ...@@ -110,9 +110,9 @@ void CorePlugin::fileOpenRequest(const QString &f)
remoteCommand(QStringList(), QStringList(f)); remoteCommand(QStringList(), QStringList(f));
} }
void CorePlugin::shutdown() void CorePlugin::aboutToShutdown()
{ {
m_mainWindow->shutdown(); m_mainWindow->aboutToShutdown();
Ne7SshObject::removeInstance(); Ne7SshObject::removeInstance();
} }
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
virtual bool initialize(const QStringList &arguments, QString *errorMessage = 0); virtual bool initialize(const QStringList &arguments, QString *errorMessage = 0);
virtual void extensionsInitialized(); virtual void extensionsInitialized();
virtual void shutdown(); virtual void aboutToShutdown();
virtual void remoteCommand(const QStringList & /* options */, const QStringList &args); virtual void remoteCommand(const QStringList & /* options */, const QStringList &args);
public slots: public slots:
......
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
The application is guaranteed to shut down after this signal is emitted. The application is guaranteed to shut down after this signal is emitted.
It's there as an addition to the usual plugin lifecycle methods, namely It's there as an addition to the usual plugin lifecycle methods, namely
IPlugin::shutdown(), just for convenience. IPlugin::aboutToShutdown(), just for convenience.
*/ */
/*! /*!
......
...@@ -1111,7 +1111,7 @@ void MainWindow::resetContext() ...@@ -1111,7 +1111,7 @@ void MainWindow::resetContext()
updateContextObject(0); updateContextObject(0);
} }
void MainWindow::shutdown() void MainWindow::aboutToShutdown()
{ {
disconnect(QApplication::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)), disconnect(QApplication::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)),
this, SLOT(updateFocusWidget(QWidget*,QWidget*))); this, SLOT(updateFocusWidget(QWidget*,QWidget*)));
......
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
bool init(QString *errorMessage); bool init(QString *errorMessage);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void aboutToShutdown();
IContext *contextObject(QWidget *widget); IContext *contextObject(QWidget *widget);
void addContextObject(IContext *contex); void addContextObject(IContext *contex);
......
...@@ -146,7 +146,7 @@ void CodepasterPlugin::extensionsInitialized() ...@@ -146,7 +146,7 @@ void CodepasterPlugin::extensionsInitialized()
{ {
} }
void CodepasterPlugin::shutdown() void CodepasterPlugin::aboutToShutdown()
{ {
// Delete temporary, fetched files // Delete temporary, fetched files
foreach(const QString &fetchedSnippet, m_fetchedSnippets) { foreach(const QString &fetchedSnippet, m_fetchedSnippets) {
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
virtual bool initialize(const QStringList &arguments, QString *error_message); virtual bool initialize(const QStringList &arguments, QString *error_message);
virtual void extensionsInitialized(); virtual void extensionsInitialized();
virtual void shutdown(); virtual void aboutToShutdown();
public slots: public slots:
void postEditor(); void postEditor();
......
...@@ -318,7 +318,7 @@ void CppPlugin::extensionsInitialized() ...@@ -318,7 +318,7 @@ void CppPlugin::extensionsInitialized()
{ {
} }
void CppPlugin::shutdown() void CppPlugin::aboutToShutdown()
{ {
writeSettings(); writeSettings();
} }
......
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
bool initialize(const QStringList &arguments, QString *error_message = 0); bool initialize(const QStringList &arguments, QString *error_message = 0);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void aboutToShutdown();
// Connect editor to settings changed signals. // Connect editor to settings changed signals.
void initializeEditor(CPPEditor *editor); void initializeEditor(CPPEditor *editor);
......
...@@ -168,7 +168,7 @@ void CppToolsPlugin::extensionsInitialized() ...@@ -168,7 +168,7 @@ void CppToolsPlugin::extensionsInitialized()
m_modelManager->setHeaderSuffixes(mimeType.suffixes()); m_modelManager->setHeaderSuffixes(mimeType.suffixes());
} }
void CppToolsPlugin::shutdown() void CppToolsPlugin::aboutToShutdown()
{ {
// Save settings // Save settings
QSettings *settings = Core::ICore::instance()->settings(); QSettings *settings = Core::ICore::instance()->settings();
......
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
bool initialize(const QStringList &arguments, QString *error_message); bool initialize(const QStringList &arguments, QString *error_message);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void aboutToShutdown();
CppModelManager *cppModelManager() { return m_modelManager; } CppModelManager *cppModelManager() { return m_modelManager; }
QString correspondingHeaderOrSource(const QString &fileName) const; QString correspondingHeaderOrSource(const QString &fileName) const;
......
...@@ -854,7 +854,7 @@ void DebuggerManager::showApplicationOutput(const QString &str, bool onStdErr) ...@@ -854,7 +854,7 @@ void DebuggerManager::showApplicationOutput(const QString &str, bool onStdErr)
emit applicationOutputAvailable(str, onStdErr); emit applicationOutputAvailable(str, onStdErr);
} }
void DebuggerManager::shutdown() void DebuggerManager::aboutToShutdown()
{ {
STATE_DEBUG(d->m_engine); STATE_DEBUG(d->m_engine);
if (d->m_engine) if (d->m_engine)
......
...@@ -344,7 +344,7 @@ private: ...@@ -344,7 +344,7 @@ private:
void runTest(const QString &fileName); void runTest(const QString &fileName);
Q_SLOT void createNewDock(QWidget *widget); Q_SLOT void createNewDock(QWidget *widget);
void shutdown(); void aboutToShutdown();
void toggleBreakpoint(const QString &fileName, int lineNumber); void toggleBreakpoint(const QString &fileName, int lineNumber);
Internal::BreakpointData *findBreakpoint(const QString &fileName, int lineNumber); Internal::BreakpointData *findBreakpoint(const QString &fileName, int lineNumber);
......
...@@ -565,16 +565,16 @@ DebuggerPlugin::~DebuggerPlugin() ...@@ -565,16 +565,16 @@ DebuggerPlugin::~DebuggerPlugin()
m_uiSwitcher = 0; m_uiSwitcher = 0;
} }
void DebuggerPlugin::shutdown() void DebuggerPlugin::aboutToShutdown()
{ {
QTC_ASSERT(m_manager, /**/); QTC_ASSERT(m_manager, /**/);
if (m_manager) if (m_manager)
m_manager->shutdown(); m_manager->aboutToShutdown();
writeSettings(); writeSettings();
if (m_uiSwitcher) if (m_uiSwitcher)
m_uiSwitcher->shutdown(); m_uiSwitcher->aboutToShutdown();
} }
static QString msgParameterMissing(const QString &a) static QString msgParameterMissing(const QString &a)
......
...@@ -83,7 +83,7 @@ public: ...@@ -83,7 +83,7 @@ public:
private: private:
virtual bool initialize(const QStringList &arguments, QString *error_message); virtual bool initialize(const QStringList &arguments, QString *error_message);
virtual void shutdown(); virtual void aboutToShutdown();
virtual void extensionsInitialized(); virtual void extensionsInitialized();
virtual void remoteCommand(const QStringList &options, const QStringList &arguments); virtual void remoteCommand(const QStringList &options, const QStringList &arguments);
......
...@@ -421,7 +421,7 @@ QWidget *DebuggerUISwitcher::createContents(Core::BaseMode *mode) ...@@ -421,7 +421,7 @@ QWidget *DebuggerUISwitcher::createContents(Core::BaseMode *mode)
return splitter; return splitter;
} }
void DebuggerUISwitcher::shutdown() void DebuggerUISwitcher::aboutToShutdown()
{ {
writeSettings(); writeSettings();
} }
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
// called when all dependent plugins have loaded // called when all dependent plugins have loaded
void initialize(); void initialize();
void shutdown(); void aboutToShutdown();
// dockwidgets are registered to the main window // dockwidgets are registered to the main window
QDockWidget *createDockWidget(const QString &langName, QWidget *widget, QDockWidget *createDockWidget(const QString &langName, QWidget *widget,
......
...@@ -480,7 +480,7 @@ public: ...@@ -480,7 +480,7 @@ public:
friend class FakeVimPlugin; friend class FakeVimPlugin;
bool initialize(); bool initialize();
void shutdown(); void aboutToShutdown();
private slots: private slots:
void editorOpened(Core::IEditor *); void editorOpened(Core::IEditor *);
...@@ -560,7 +560,7 @@ FakeVimPluginPrivate::~FakeVimPluginPrivate() ...@@ -560,7 +560,7 @@ FakeVimPluginPrivate::~FakeVimPluginPrivate()
{ {
} }
void FakeVimPluginPrivate::shutdown() void FakeVimPluginPrivate::aboutToShutdown()
{ {
q->removeObject(m_fakeVimOptionsPage); q->removeObject(m_fakeVimOptionsPage);
delete m_fakeVimOptionsPage; delete m_fakeVimOptionsPage;
...@@ -1151,9 +1151,9 @@ bool FakeVimPlugin::initialize(const QStringList &arguments, QString *errorMessa ...@@ -1151,9 +1151,9 @@ bool FakeVimPlugin::initialize(const QStringList &arguments, QString *errorMessa
return d->initialize(); return d->initialize();
} }
void FakeVimPlugin::shutdown() void FakeVimPlugin::aboutToShutdown()
{ {
d->shutdown(); d->aboutToShutdown();
} }
void FakeVimPlugin::extensionsInitialized() void FakeVimPlugin::extensionsInitialized()
......
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
private: private:
// implementation of ExtensionSystem::IPlugin // implementation of ExtensionSystem::IPlugin
bool initialize(const QStringList &arguments, QString *error_message); bool initialize(const QStringList &arguments, QString *error_message);
void shutdown(); void aboutToShutdown();
void extensionsInitialized(); void extensionsInitialized();
private: private:
......
...@@ -142,7 +142,7 @@ void FindPlugin::extensionsInitialized() ...@@ -142,7 +142,7 @@ void FindPlugin::extensionsInitialized()
readSettings(); readSettings();
} }
void FindPlugin::shutdown() void FindPlugin::aboutToShutdown()
{ {
d->m_findToolBar->setVisible(false); d->m_findToolBar->setVisible(false);
d->m_findToolBar->setParent(0); d->m_findToolBar->setParent(0);
......
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
// IPlugin // IPlugin
bool initialize(const QStringList &arguments, QString *error_message); bool initialize(const QStringList &arguments, QString *error_message);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void aboutToShutdown();
QTextDocument::FindFlags findFlags() const; QTextDocument::FindFlags findFlags() const;
void updateFindCompletion(const QString &text); void updateFindCompletion(const QString &text);
......
...@@ -358,7 +358,7 @@ void HelpPlugin::extensionsInitialized() ...@@ -358,7 +358,7 @@ void HelpPlugin::extensionsInitialized()
connect(engine, SIGNAL(setupFinished()), this, SLOT(updateFilterComboBox())); connect(engine, SIGNAL(setupFinished()), this, SLOT(updateFilterComboBox()));
} }
void HelpPlugin::shutdown() void HelpPlugin::aboutToShutdown()
{ {
if (m_sideBar) if (m_sideBar)
m_sideBar->saveSettings(m_core->settings(), QLatin1String("HelpSideBar")); m_sideBar->saveSettings(m_core->settings(), QLatin1String("HelpSideBar"));
......
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
bool initialize(const QStringList &arguments, QString *error_message); bool initialize(const QStringList &arguments, QString *error_message);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void aboutToShutdown();
private slots: private slots:
void modeChanged(Core::IMode *mode); void modeChanged(Core::IMode *mode);
......
...@@ -899,9 +899,9 @@ void ProjectExplorerPlugin::extensionsInitialized() ...@@ -899,9 +899,9 @@ void ProjectExplorerPlugin::extensionsInitialized()
addAutoReleasedObject(cpw); addAutoReleasedObject(cpw);
} }
void ProjectExplorerPlugin::shutdown() void ProjectExplorerPlugin::aboutToShutdown()
{ {
d->m_proWindow->shutdown(); // disconnect from session d->m_proWindow->aboutToShutdown(); // disconnect from session
d->m_session->clear(); d->m_session->clear();
d->m_projectsMode = 0; d->m_projectsMode = 0;
// d->m_proWindow->saveConfigChanges(); // d->m_proWindow->saveConfigChanges();
......
...@@ -100,7 +100,7 @@ public: ...@@ -100,7 +100,7 @@ public:
//PluginInterface //PluginInterface
bool initialize(const QStringList &arguments, QString *error_message); bool initialize(const QStringList &arguments, QString *error_message);
void extensionsInitialized(); void extensionsInitialized();
void shutdown(); void aboutToShutdown();
void setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes); void setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes);
Internal::ProjectExplorerSettings projectExplorerSettings() const; Internal::ProjectExplorerSettings projectExplorerSettings() const;
......
...@@ -269,7 +269,7 @@ ProjectWindow::~ProjectWindow() ...@@ -269,7 +269,7 @@ ProjectWindow::~ProjectWindow()
{ {
} }
void ProjectWindow::shutdown() void ProjectWindow::aboutToShutdown()
{ {
showProperties(-1, -1); // TODO that's a bit stupid, but otherwise stuff is still showProperties(-1, -1); // TODO that's a bit stupid, but otherwise stuff is still
// connected to the session // connected to the session
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
explicit ProjectWindow(QWidget *parent = 0); explicit ProjectWindow(QWidget *parent = 0);
~ProjectWindow(); ~ProjectWindow();
void shutdown(); void aboutToShutdown();
private slots: private slots:
void showProperties(int index, int subIndex); void showProperties(int index, int subIndex);
void restoreStatus(); void restoreStatus();
......
...@@ -84,7 +84,7 @@ QmlInspectorPlugin::~QmlInspectorPlugin() ...@@ -84,7 +84,7 @@ QmlInspectorPlugin::~QmlInspectorPlugin()
m_inspector = 0; m_inspector = 0;
} }
void QmlInspectorPlugin::shutdown() void QmlInspectorPlugin::aboutToShutdown()
{ {
} }
......
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
virtual bool initialize(const QStringList &arguments, QString *errorString); virtual bool initialize(const QStringList &arguments, QString *errorString);
virtual void extensionsInitialized(); virtual void extensionsInitialized();
virtual void shutdown(); virtual void aboutToShutdown();
public slots: public slots:
void activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode); void activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode);
......
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