Commit 3ebc5220 authored by hjk's avatar hjk
Browse files

Debugger: Simplify raise-on-stop logic



Also slightly change meaning (now all stops may cause raising).

Change-Id: Ie3fee7371ab119e4e9747dc44a4d8ef2cd62c8d8
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 7e8a945e
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/progressmanager/futureprogress.h> #include <coreplugin/progressmanager/futureprogress.h>
...@@ -944,7 +945,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop() ...@@ -944,7 +945,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop()
showStatusMessage(tr("Stopped.")); showStatusMessage(tr("Stopped."));
setState(InferiorStopOk); setState(InferiorStopOk);
if (debuggerCore()->boolSetting(RaiseOnInterrupt)) if (debuggerCore()->boolSetting(RaiseOnInterrupt))
emit raiseWindow(); ICore::raiseWindow(debuggerCore()->mainWindow());
} }
void DebuggerEngine::notifyInferiorStopFailed() void DebuggerEngine::notifyInferiorStopFailed()
......
...@@ -283,7 +283,6 @@ signals: ...@@ -283,7 +283,6 @@ signals:
* a server start script should be used, but none is given. * a server start script should be used, but none is given.
*/ */
void requestRemoteSetup(); void requestRemoteSetup();
void raiseWindow();
protected: protected:
// The base notify*() function implementation should be sufficient // The base notify*() function implementation should be sufficient
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "debuggermainwindow.h" #include "debuggermainwindow.h"
#include "debuggercore.h" #include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerrunconfigurationaspect.h" #include "debuggerrunconfigurationaspect.h"
#include <utils/appmainwindow.h> #include <utils/appmainwindow.h>
...@@ -131,8 +130,6 @@ public: ...@@ -131,8 +130,6 @@ public:
Project *m_previousProject; Project *m_previousProject;
Target *m_previousTarget; Target *m_previousTarget;
RunConfiguration *m_previousRunConfiguration; RunConfiguration *m_previousRunConfiguration;
DebuggerEngine *m_engine;
}; };
DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw) DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
...@@ -150,7 +147,6 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw) ...@@ -150,7 +147,6 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
, m_previousProject(0) , m_previousProject(0)
, m_previousTarget(0) , m_previousTarget(0)
, m_previousRunConfiguration(0) , m_previousRunConfiguration(0)
, m_engine(0)
{ {
m_debugToolBarLayout->setMargin(0); m_debugToolBarLayout->setMargin(0);
m_debugToolBarLayout->setSpacing(0); m_debugToolBarLayout->setSpacing(0);
...@@ -266,15 +262,6 @@ DebuggerMainWindow::~DebuggerMainWindow() ...@@ -266,15 +262,6 @@ DebuggerMainWindow::~DebuggerMainWindow()
delete d; delete d;
} }
void DebuggerMainWindow::setCurrentEngine(DebuggerEngine *engine)
{
if (d->m_engine)
disconnect(d->m_engine, SIGNAL(raiseWindow()), ICore::mainWindow(), SLOT(raiseWindow()));
d->m_engine = engine;
if (d->m_engine)
connect(d->m_engine, SIGNAL(raiseWindow()), ICore::mainWindow(), SLOT(raiseWindow()));
}
DebuggerLanguages DebuggerMainWindow::activeDebugLanguages() const DebuggerLanguages DebuggerMainWindow::activeDebugLanguages() const
{ {
return d->m_activeDebugLanguages; return d->m_activeDebugLanguages;
......
...@@ -69,8 +69,6 @@ public: ...@@ -69,8 +69,6 @@ public:
DebuggerMainWindow(); DebuggerMainWindow();
~DebuggerMainWindow(); ~DebuggerMainWindow();
void setCurrentEngine(DebuggerEngine *engine);
// Debugger toolbars are registered with this function. // Debugger toolbars are registered with this function.
void setToolBar(DebuggerLanguage language, QWidget *widget); void setToolBar(DebuggerLanguage language, QWidget *widget);
......
...@@ -2109,7 +2109,6 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine) ...@@ -2109,7 +2109,6 @@ void DebuggerPluginPrivate::connectEngine(DebuggerEngine *engine)
m_inspectorWindow->setModel(engine->watchModel()); m_inspectorWindow->setModel(engine->watchModel());
mainWindow()->setEngineDebugLanguages(engine->startParameters().languages); mainWindow()->setEngineDebugLanguages(engine->startParameters().languages);
mainWindow()->setCurrentEngine(engine);
} }
static void changeFontSize(QWidget *widget, qreal size) static void changeFontSize(QWidget *widget, qreal size)
......
Supports Markdown
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