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) :
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();
......
......@@ -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);
......
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