Commit 7a1bf412 authored by Aurindam Jana's avatar Aurindam Jana Committed by Aurindam Jana

QmlCppEngine: StackWindow Behaviour

Enable/Disable the stack window based on engine state.
Update the markers in the stack window correctly.

Change-Id: Idbc694aa2a4be9497e2e3b2c9e9a1f463e1c7692
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 63dac82a
...@@ -149,9 +149,9 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp, ...@@ -149,9 +149,9 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp,
} }
d->m_activeEngine = d->m_cppEngine; d->m_activeEngine = d->m_cppEngine;
connect(d->m_cppEngine->stackHandler()->model(), SIGNAL(modelReset()), connect(d->m_cppEngine->stackHandler(), SIGNAL(stackChanged()),
d, SLOT(cppStackChanged()), Qt::QueuedConnection); d, SLOT(cppStackChanged()), Qt::QueuedConnection);
connect(d->m_qmlEngine->stackHandler()->model(), SIGNAL(modelReset()), connect(d->m_qmlEngine->stackHandler(), SIGNAL(stackChanged()),
d, SLOT(qmlStackChanged()), Qt::QueuedConnection); d, SLOT(qmlStackChanged()), Qt::QueuedConnection);
connect(d->m_cppEngine, SIGNAL(stackFrameCompleted()), this, SIGNAL(stackFrameCompleted())); connect(d->m_cppEngine, SIGNAL(stackFrameCompleted()), this, SIGNAL(stackFrameCompleted()));
connect(d->m_cppEngine, SIGNAL(requestRemoteSetup()), this, SIGNAL(requestRemoteSetup())); connect(d->m_cppEngine, SIGNAL(requestRemoteSetup()), this, SIGNAL(requestRemoteSetup()));
...@@ -195,6 +195,9 @@ void QmlCppEngine::fetchDisassembler(DisassemblerAgent *da) ...@@ -195,6 +195,9 @@ void QmlCppEngine::fetchDisassembler(DisassemblerAgent *da)
void QmlCppEngine::activateFrame(int index) void QmlCppEngine::activateFrame(int index)
{ {
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
return;
if (index >= d->m_stackBoundary) if (index >= d->m_stackBoundary)
d->m_qmlEngine->activateFrame(index - d->m_stackBoundary); d->m_qmlEngine->activateFrame(index - d->m_stackBoundary);
else else
...@@ -681,6 +684,8 @@ void QmlCppEngine::resetLocation() ...@@ -681,6 +684,8 @@ void QmlCppEngine::resetLocation()
d->m_qmlEngine->resetLocation(); d->m_qmlEngine->resetLocation();
if (d->m_cppEngine) if (d->m_cppEngine)
d->m_cppEngine->resetLocation(); d->m_cppEngine->resetLocation();
DebuggerEngine::resetLocation();
} }
DebuggerEngine *QmlCppEngine::cppEngine() const DebuggerEngine *QmlCppEngine::cppEngine() const
......
...@@ -197,6 +197,7 @@ void StackHandler::setFrames(const StackFrames &frames, bool canExpand) ...@@ -197,6 +197,7 @@ void StackHandler::setFrames(const StackFrames &frames, bool canExpand)
if (m_currentIndex >= m_stackFrames.size()) if (m_currentIndex >= m_stackFrames.size())
m_currentIndex = m_stackFrames.size() - 1; m_currentIndex = m_stackFrames.size() - 1;
reset(); reset();
emit stackChanged();
} }
const StackFrames &StackHandler::frames() const const StackFrames &StackHandler::frames() const
......
...@@ -85,6 +85,9 @@ public: ...@@ -85,6 +85,9 @@ public:
void scheduleResetLocation(); void scheduleResetLocation();
void resetLocation(); void resetLocation();
signals:
void stackChanged();
private: private:
// QAbstractTableModel // QAbstractTableModel
int rowCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent) const;
......
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