debugger: empty list of fetched variables at the end of the full cycle

The original logic was faulty but worked better in the presence of the
original "extra layoutChanged()" hack which is replaced now.
This commit is contained in:
hjk
2010-03-09 17:37:36 +01:00
parent c741f83514
commit dd7abf87a6
3 changed files with 13 additions and 16 deletions

View File

@@ -51,7 +51,7 @@ void GdbEngine::updateLocalsPython(const QByteArray &varList)
PRECONDITION; PRECONDITION;
m_processedNames.clear(); m_processedNames.clear();
manager()->watchHandler()->beginCycle(true); manager()->watchHandler()->beginCycle();
//m_toolTipExpression.clear(); //m_toolTipExpression.clear();
WatchHandler *handler = m_manager->watchHandler(); WatchHandler *handler = m_manager->watchHandler();

View File

@@ -402,16 +402,15 @@ void WatchModel::emitAllChanged()
emit layoutChanged(); emit layoutChanged();
} }
void WatchModel::beginCycle(bool clearFetchTriggered) void WatchModel::beginCycle()
{ {
emit enableUpdates(false); emit enableUpdates(false);
if (clearFetchTriggered)
m_fetchTriggered.clear();
} }
void WatchModel::endCycle() void WatchModel::endCycle()
{ {
removeOutdated(); removeOutdated();
m_fetchTriggered.clear();
emit enableUpdates(true); emit enableUpdates(true);
} }
@@ -1196,12 +1195,12 @@ WatchHandler::WatchHandler(DebuggerManager *manager)
SIGNAL(triggered()), this, SLOT(emitAllChanged())); SIGNAL(triggered()), this, SLOT(emitAllChanged()));
} }
void WatchHandler::beginCycle(bool clearFetchTriggered) void WatchHandler::beginCycle()
{ {
++generationCounter; ++generationCounter;
m_locals->beginCycle(clearFetchTriggered); m_locals->beginCycle();
m_watchers->beginCycle(clearFetchTriggered); m_watchers->beginCycle();
m_tooltips->beginCycle(clearFetchTriggered); m_tooltips->beginCycle();
} }
void WatchHandler::endCycle() void WatchHandler::endCycle()

View File

@@ -225,8 +225,8 @@ private:
void emitDataChanged(int column, void emitDataChanged(int column,
const QModelIndex &parentIndex = QModelIndex()); const QModelIndex &parentIndex = QModelIndex());
void beginCycle(bool clearFetchTriggered); // called at begin of updateLocals() cycle void beginCycle(); // Called at begin of updateLocals() cycle.
void endCycle(); // called after all results have been received void endCycle(); // Called after all results have been received.
friend QDebug operator<<(QDebug d, const WatchModel &m); friend QDebug operator<<(QDebug d, const WatchModel &m);
@@ -255,18 +255,16 @@ public:
WatchModel *model(WatchType type) const; WatchModel *model(WatchType type) const;
WatchModel *modelForIName(const QByteArray &iname) const; WatchModel *modelForIName(const QByteArray &iname) const;
//public slots:
void cleanup(); void cleanup();
Q_SLOT void watchExpression(); // data in action->data().toString() Q_SLOT void watchExpression(); // Data passed in action->data().toString()
Q_SLOT void watchExpression(const QString &exp); Q_SLOT void watchExpression(const QString &exp);
Q_SLOT void removeWatchExpression(); Q_SLOT void removeWatchExpression();
Q_SLOT void removeWatchExpression(const QString &exp); Q_SLOT void removeWatchExpression(const QString &exp);
Q_SLOT void emitAllChanged(); Q_SLOT void emitAllChanged();
// called at begin of updateLocals() cycle void beginCycle(); // Called at begin of updateLocals() cycle
void beginCycle(bool clearFetchTriggered = true); void updateWatchers(); // Called after locals are fetched
void updateWatchers(); // called after locals are fetched void endCycle(); // Called after all results have been received
void endCycle(); // called after all results have been received
void showEditValue(const WatchData &data); void showEditValue(const WatchData &data);
void insertData(const WatchData &data); void insertData(const WatchData &data);