Commit b65bbff4 authored by hjk's avatar hjk
Browse files

debugger: split connectDebuggingHelperActions(bool) into connect* and disconnect*

parent 378036c9
...@@ -199,22 +199,23 @@ GdbEngine::GdbEngine(DebuggerManager *parent) : ...@@ -199,22 +199,23 @@ GdbEngine::GdbEngine(DebuggerManager *parent) :
Qt::QueuedConnection); Qt::QueuedConnection);
} }
void GdbEngine::connectDebuggingHelperActions(bool on) void GdbEngine::connectDebuggingHelperActions()
{ {
if (on) { connect(theDebuggerAction(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
connect(theDebuggerAction(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)), this, SLOT(setUseDebuggingHelpers(QVariant)));
this, SLOT(setUseDebuggingHelpers(QVariant))); connect(theDebuggerAction(DebugDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
connect(theDebuggerAction(DebugDebuggingHelpers), SIGNAL(valueChanged(QVariant)), this, SLOT(setDebugDebuggingHelpers(QVariant)));
this, SLOT(setDebugDebuggingHelpers(QVariant))); connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()),
connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()), this, SLOT(recheckDebuggingHelperAvailability()));
this, SLOT(recheckDebuggingHelperAvailability()));
} else {
disconnect(theDebuggerAction(UseDebuggingHelpers), 0, this, 0);
disconnect(theDebuggerAction(DebugDebuggingHelpers), 0, this, 0);
disconnect(theDebuggerAction(RecheckDebuggingHelpers), 0, this, 0);
}
} }
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 DebuggerStartMode GdbEngine::startMode() const
{ {
QTC_ASSERT(!m_startParameters.isNull(), return NoStartMode); QTC_ASSERT(!m_startParameters.isNull(), return NoStartMode);
...@@ -1515,7 +1516,7 @@ void GdbEngine::detachDebugger() ...@@ -1515,7 +1516,7 @@ void GdbEngine::detachDebugger()
void GdbEngine::exitDebugger() void GdbEngine::exitDebugger()
{ {
connectDebuggingHelperActions(false); disconnectDebuggingHelperActions();
m_outputCollector.shutdown(); m_outputCollector.shutdown();
initializeVariables(); initializeVariables();
m_gdbAdapter->shutdown(); m_gdbAdapter->shutdown();
...@@ -1536,7 +1537,7 @@ void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp) ...@@ -1536,7 +1537,7 @@ void GdbEngine::startDebugger(const DebuggerStartParametersPtr &sp)
m_startParameters = sp; m_startParameters = sp;
if (startModeAllowsDumpers()) if (startModeAllowsDumpers())
connectDebuggingHelperActions(true); connectDebuggingHelperActions();
if (m_gdbAdapter) if (m_gdbAdapter)
disconnectAdapter(); disconnectAdapter();
......
...@@ -411,7 +411,8 @@ private: ...@@ -411,7 +411,8 @@ private:
void setWatchDataType(WatchData &data, const GdbMi &mi); void setWatchDataType(WatchData &data, const GdbMi &mi);
void setWatchDataDisplayedType(WatchData &data, const GdbMi &mi); void setWatchDataDisplayedType(WatchData &data, const GdbMi &mi);
void setLocals(const QList<GdbMi> &locals); void setLocals(const QList<GdbMi> &locals);
void connectDebuggingHelperActions(bool on); void connectDebuggingHelperActions();
void disconnectDebuggingHelperActions();
bool startModeAllowsDumpers() const; bool startModeAllowsDumpers() const;
QString parseDisassembler(const GdbMi &lines); QString parseDisassembler(const GdbMi &lines);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment