aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2010-07-13 13:36:47 +0200
committercon <qtc-committer@nokia.com>2010-07-13 15:25:21 +0200
commitb3dbc4b4e4fd97c9a3327d72272402d1cc6cd5f4 (patch)
treecc624c18299085c262fa1963e48fadc3e6ed9e6c /src/plugins/cpaster
parentadf2c1b0dacf0f89954cabe25d7d0524144d31a2 (diff)
Add flag to IPlugin::aboutToShutdown that allows asynchronous shutdown.
If a plugin requests asyncronous shutdown, the shutdown sequence does not continue to deleting the plugins before it has sent a asynchronousShutdownFinished signal. During that time an event loop is running.
Diffstat (limited to 'src/plugins/cpaster')
-rw-r--r--src/plugins/cpaster/cpasterplugin.cpp3
-rw-r--r--src/plugins/cpaster/cpasterplugin.h2
2 files changed, 3 insertions, 2 deletions
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();