diff options
Diffstat (limited to 'src/plugins/debugger/gdb/gdbplainengine.cpp')
-rw-r--r-- | src/plugins/debugger/gdb/gdbplainengine.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/plugins/debugger/gdb/gdbplainengine.cpp b/src/plugins/debugger/gdb/gdbplainengine.cpp index 4b955e60d9..c19bdde3a8 100644 --- a/src/plugins/debugger/gdb/gdbplainengine.cpp +++ b/src/plugins/debugger/gdb/gdbplainengine.cpp @@ -45,19 +45,16 @@ namespace Debugger { namespace Internal { -#define CB(callback) \ - static_cast<GdbEngine::GdbCommandCallback>(&GdbPlainEngine::callback), \ - STRINGIFY(callback) +#define CB(callback) [this](const DebuggerResponse &r) { callback(r); } GdbPlainEngine::GdbPlainEngine(const DebuggerStartParameters &startParameters) : GdbEngine(startParameters) { // Output - connect(&m_outputCollector, SIGNAL(byteDelivery(QByteArray)), - this, SLOT(readDebugeeOutput(QByteArray))); + connect(&m_outputCollector, &OutputCollector::byteDelivery, + this, &GdbEngine::readDebugeeOutput); } - void GdbPlainEngine::setupInferior() { QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); @@ -66,13 +63,13 @@ void GdbPlainEngine::setupInferior() postCommand("-exec-arguments " + toLocalEncoding(args)); } postCommand("-file-exec-and-symbols \"" + execFilePath() + '"', - CB(handleFileExecAndSymbols)); + NoFlags, CB(handleFileExecAndSymbols)); } -void GdbPlainEngine::handleFileExecAndSymbols(const GdbResponse &response) +void GdbPlainEngine::handleFileExecAndSymbols(const DebuggerResponse &response) { QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); - if (response.resultClass == GdbResultDone) { + if (response.resultClass == ResultDone) { handleInferiorPrepared(); } else { QByteArray ba = response.data["msg"].data(); @@ -92,10 +89,10 @@ void GdbPlainEngine::runEngine() postCommand("-exec-run", GdbEngine::RunRequest, CB(handleExecRun)); } -void GdbPlainEngine::handleExecRun(const GdbResponse &response) +void GdbPlainEngine::handleExecRun(const DebuggerResponse &response) { QTC_ASSERT(state() == EngineRunRequested, qDebug() << state()); - if (response.resultClass == GdbResultRunning) { + if (response.resultClass == ResultRunning) { //notifyEngineRunOkAndInferiorRunRequested(); notifyEngineRunAndInferiorRunOk(); // For gdb < 7.0 //showStatusMessage(tr("Running...")); |