diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 0b4b671acfed8c496d8eacf5b57c0bd57c5de4b0..cabd13102590be510250243de996f207f5cf3ee6 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -199,22 +199,23 @@ GdbEngine::GdbEngine(DebuggerManager *parent) : Qt::QueuedConnection); } -void GdbEngine::connectDebuggingHelperActions(bool on) -{ - if (on) { - connect(theDebuggerAction(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)), - this, SLOT(setUseDebuggingHelpers(QVariant))); - connect(theDebuggerAction(DebugDebuggingHelpers), SIGNAL(valueChanged(QVariant)), - this, SLOT(setDebugDebuggingHelpers(QVariant))); - connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()), - this, SLOT(recheckDebuggingHelperAvailability())); - } else { - disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0); - disconnect(theDebuggerAction(DebugDebuggingHelpers), 0, this, 0); - disconnect(theDebuggerAction(RecheckDebuggingHelpers), 0, this, 0); - } +void GdbEngine::connectDebuggingHelperActions() +{ + connect(theDebuggerAction(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)), + this, SLOT(setUseDebuggingHelpers(QVariant))); + connect(theDebuggerAction(DebugDebuggingHelpers), SIGNAL(valueChanged(QVariant)), + this, SLOT(setDebugDebuggingHelpers(QVariant))); + connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()), + this, SLOT(recheckDebuggingHelperAvailability())); } +void GdbEngine::disconnectDebuggingHelperActions() +{ + disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0); + disconnect(theDebuggerAction(DebugDebuggingHelpers), 0, this, 0); + disconnect(theDebuggerAction(RecheckDebuggingHelpers), 0, this, 0); +} + DebuggerStartMode GdbEngine::startMode() const { QTC_ASSERT(!m_startParameters.isNull(), return NoStartMode); @@ -1515,7 +1516,7 @@ void GdbEngine::detachDebugger() void GdbEngine::exitDebugger() { - connectDebuggingHelperActions(false); + disconnectDebuggingHelperActions(); m_outputCollector.shutdown(); initializeVariables(); m_gdbAdapter->shutdown(); @@ -1536,7 +1537,7 @@ void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp) m_startParameters = sp; if (startModeAllowsDumpers()) - connectDebuggingHelperActions(true); + connectDebuggingHelperActions(); if (m_gdbAdapter) disconnectAdapter(); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 765a958add3bc65c4254f6483f9fbeb6969faec0..d39546f9b812f3ea9b4194f91323cc0bd63b9d5b 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -411,7 +411,8 @@ private: void setWatchDataType(WatchData &data, const GdbMi &mi); void setWatchDataDisplayedType(WatchData &data, const GdbMi &mi); void setLocals(const QList<GdbMi> &locals); - void connectDebuggingHelperActions(bool on); + void connectDebuggingHelperActions(); + void disconnectDebuggingHelperActions(); bool startModeAllowsDumpers() const; QString parseDisassembler(const GdbMi &lines);