Debugger: Refactor run control termination.

Fix breakage introduced by the new asynchronous stop() methods
of the debugger run controls. Allow for RunControl::stop() to
be asynchronous by introducing a return enumeration indicating
that. Introduce additional method aboutToStop() asking user
to quit (tie that to the RunControl instead of having to hack
the behaviour elsewhere).
If asynchronous stop is detected, terminate the ProjectExplorer
asynchronously.
This makes the behaviour consistent across switching sessions/
closing outputwindow tabs and quitting Qt Creator.

Reviewed-by: dt
Rubber-stamped-by: hjk
This commit is contained in:
Friedemann Kleint
2010-08-20 14:19:25 +02:00
parent fa68a545a8
commit 6840c1d198
22 changed files with 376 additions and 256 deletions

View File

@@ -97,13 +97,9 @@ public slots:
private:
friend class Internal::DebuggerEngine;
friend class Internal::DebuggerListener;
friend class DebuggerPluginPrivate;
friend class DebuggerRunControl;
bool coreAboutToClose();
void resetLocation();
void gotoLocation(const QString &fileName, int lineNumber, bool setMarker);
void activatePreviousMode();
@@ -122,7 +118,6 @@ private:
QMessageBox *showMessageBox(int icon, const QString &title,
const QString &text, int buttons = 0);
Q_SLOT void emitShutdownFinished();
bool initialize(const QStringList &arguments, QString *errorMessage);
ShutdownFlag aboutToShutdown();
void extensionsInitialized();