forked from qt-creator/qt-creator
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: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
committed by
Aurindam Jana
parent
63dac82a0a
commit
7a1bf412fb
@@ -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)
|
|||||||
|
|
||||||
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()
|
|||||||
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)
|
|||||||
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:
|
|||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user