Debugger: Move some commonly used flags to base DebuggerTool

Basically all derived tools will need access to the debugger aspect
data. Fetch it once.

Change-Id: I054e4255a036db258201a8a501af244206c06990
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-05-03 12:35:00 +02:00
parent 20cacb4a8a
commit ba5d12e80f
4 changed files with 55 additions and 41 deletions

View File

@@ -41,14 +41,21 @@ class DEBUGGER_EXPORT DebuggerRunTool : public ProjectExplorer::ToolRunner
Q_OBJECT
public:
DebuggerRunTool(ProjectExplorer::RunControl *runControl); // Use.
DebuggerRunTool(ProjectExplorer::RunControl *runControl,
const DebuggerStartParameters &sp,
QString *errorMessage = nullptr); // Use.
QString *errorMessage = nullptr); // Use rarely.
DebuggerRunTool(ProjectExplorer::RunControl *runControl,
const Internal::DebuggerRunParameters &rp,
QString *errorMessage = nullptr); // FIXME: Don't use.
~DebuggerRunTool();
void setStartParameters(const DebuggerStartParameters &sp,
QString *errorMessage = nullptr); // Use rarely.
void setRunParameters(const Internal::DebuggerRunParameters &rp,
QString *errorMessage = nullptr); // FIXME: Don't use.
Internal::DebuggerEngine *engine() const { return m_engine; }
void showMessage(const QString &msg, int channel = LogDebug, int timeout = -1);
@@ -71,6 +78,9 @@ public:
DebuggerStartParameters &startParameters(); // Used in Boot2Qt.
bool isCppDebugging() const { return m_isCppDebugging; }
bool isQmlDebugging() const { return m_isQmlDebugging; }
signals:
void stateChanged(Debugger::DebuggerState state);
void aboutToNotifyInferiorSetupOk();
@@ -79,6 +89,8 @@ signals:
private:
Internal::DebuggerEngine *m_engine = nullptr; // Master engine
QStringList m_errors;
const bool m_isCppDebugging;
const bool m_isQmlDebugging;
};
} // namespace Debugger