From 42f326af6016cc95ea6390311e3fc71006127303 Mon Sep 17 00:00:00 2001 From: hjk <qtc-committer@nokia.com> Date: Thu, 15 Jul 2010 14:01:48 +0200 Subject: [PATCH] debugger: start moving to the async shutdown infrastructure --- src/plugins/debugger/debuggerplugin.cpp | 11 ++++++++++- src/plugins/debugger/debuggerplugin.h | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 9757ddba08c..342967cd50b 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2551,9 +2551,18 @@ ExtensionSystem::IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown() d->m_uiSwitcher->aboutToShutdown(); //if (d->m_engine) // d->m_engine->shutdown(); - return SynchronousShutdown; + + // FIXME: Notify all engines instead. + QTimer::singleShot(0, this, SLOT(emitShutdownFinished())); + return AsynchronousShutdown; } +void DebuggerPlugin::emitShutdownFinished() +{ + emit asynchronousShutdownFinished(); +} + + void DebuggerPlugin::showMessage(const QString &msg, int channel, int timeout) { //qDebug() << "PLUGIN OUTPUT: " << channel << msg; diff --git a/src/plugins/debugger/debuggerplugin.h b/src/plugins/debugger/debuggerplugin.h index c7e97604274..f1429f50945 100644 --- a/src/plugins/debugger/debuggerplugin.h +++ b/src/plugins/debugger/debuggerplugin.h @@ -35,7 +35,6 @@ #include <extensionsystem/iplugin.h> QT_BEGIN_NAMESPACE -class QAbstractItemView; class QIcon; class QMessageBox; QT_END_NAMESPACE @@ -119,8 +118,9 @@ signals: private: friend class Internal::DebuggerEngine; - friend class Internal::DebuggerListener -; + friend class Internal::DebuggerListener; + + Q_SLOT void emitShutdownFinished(); bool initialize(const QStringList &arguments, QString *errorMessage); ShutdownFlag aboutToShutdown(); void extensionsInitialized(); -- GitLab