Commit d2d3c6dd authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlCppEngine: Make sure that breakpoint markers get removed



resetLocation() called by DebuggerPlugin::handle* should automatically
reset the locations for stepping etc.

Change-Id: I3e20f93ade7f40e1e1f33b1b48b11522b59771f8
Task-number: QTCREATORBUG-6291
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent a15e3a3e
...@@ -263,7 +263,7 @@ public: ...@@ -263,7 +263,7 @@ public:
int timeout = -1) const; int timeout = -1) const;
Q_SLOT void showStatusMessage(const QString &msg, int timeout = -1) const; Q_SLOT void showStatusMessage(const QString &msg, int timeout = -1) const;
void resetLocation(); virtual void resetLocation();
virtual void gotoLocation(const Internal::Location &location); virtual void gotoLocation(const Internal::Location &location);
virtual void quitDebugger(); // called by DebuggerRunControl virtual void quitDebugger(); // called by DebuggerRunControl
......
...@@ -671,6 +671,14 @@ void QmlCppEngine::showMessage(const QString &msg, int channel, int timeout) con ...@@ -671,6 +671,14 @@ void QmlCppEngine::showMessage(const QString &msg, int channel, int timeout) con
DebuggerEngine::showMessage(msg, channel, timeout); DebuggerEngine::showMessage(msg, channel, timeout);
} }
void QmlCppEngine::resetLocation()
{
if (d->m_qmlEngine)
d->m_qmlEngine->resetLocation();
if (d->m_cppEngine)
d->m_cppEngine->resetLocation();
}
DebuggerEngine *QmlCppEngine::cppEngine() const DebuggerEngine *QmlCppEngine::cppEngine() const
{ {
return d->m_cppEngine; return d->m_cppEngine;
......
...@@ -94,6 +94,7 @@ public: ...@@ -94,6 +94,7 @@ public:
void showMessage(const QString &msg, int channel = LogDebug, void showMessage(const QString &msg, int channel = LogDebug,
int timeout = -1) const; int timeout = -1) const;
void resetLocation();
protected: protected:
void detachDebugger(); void detachDebugger();
......
...@@ -451,7 +451,6 @@ void QmlEngine::executeStep() ...@@ -451,7 +451,6 @@ void QmlEngine::executeStep()
logMessage(LogSend, "STEPINTO"); logMessage(LogSend, "STEPINTO");
d->m_adapter.activeDebuggerClient()->executeStep(); d->m_adapter.activeDebuggerClient()->executeStep();
} }
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
} }
...@@ -462,7 +461,6 @@ void QmlEngine::executeStepI() ...@@ -462,7 +461,6 @@ void QmlEngine::executeStepI()
logMessage(LogSend, "STEPINTO"); logMessage(LogSend, "STEPINTO");
d->m_adapter.activeDebuggerClient()->executeStepI(); d->m_adapter.activeDebuggerClient()->executeStepI();
} }
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
} }
...@@ -473,7 +471,6 @@ void QmlEngine::executeStepOut() ...@@ -473,7 +471,6 @@ void QmlEngine::executeStepOut()
logMessage(LogSend, "STEPOUT"); logMessage(LogSend, "STEPOUT");
d->m_adapter.activeDebuggerClient()->executeStepOut(); d->m_adapter.activeDebuggerClient()->executeStepOut();
} }
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
} }
...@@ -484,7 +481,6 @@ void QmlEngine::executeNext() ...@@ -484,7 +481,6 @@ void QmlEngine::executeNext()
logMessage(LogSend, "STEPOVER"); logMessage(LogSend, "STEPOVER");
d->m_adapter.activeDebuggerClient()->executeNext(); d->m_adapter.activeDebuggerClient()->executeNext();
} }
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
} }
......
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