aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerengine.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2012-05-18 02:28:41 +0200
committerhjk <[email protected]>2012-05-24 14:33:34 +0200
commite11a3a7697e7b432ac061277694885cf3724f25c (patch)
tree46a3140ed47b072782541d005d0edbdf1259a554 /src/plugins/debugger/debuggerengine.cpp
parentc14c1248ed01f5e16975dc1082b5ce4e58052f8b (diff)
debugger: rework WatchModel
It's one model for all locals, watch, return, tooltip and inspector data. This allows more streamlined code paths and better isolation of the model data from the WatchHandler. WatchItems are now registered in a hash indexed by iname, so inames can be used as the primary handle to watch data in the WatchHandler interface. Change-Id: Idac0a808b5d785307496d1de4198a1f2e9ce3880 Reviewed-by: Aurindam Jana <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerengine.cpp')
-rw-r--r--src/plugins/debugger/debuggerengine.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 017aa11f573..4db5bc134c9 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -491,42 +491,32 @@ QAbstractItemModel *DebuggerEngine::threadsModel() const
QAbstractItemModel *DebuggerEngine::localsModel() const
{
- QAbstractItemModel *model = watchHandler()->model(LocalsWatch);
- if (model->objectName().isEmpty()) // Make debugging easier.
- model->setObjectName(objectName() + QLatin1String("LocalsModel"));
- return model;
+ return watchHandler()->model();
}
QAbstractItemModel *DebuggerEngine::watchersModel() const
{
- QAbstractItemModel *model = watchHandler()->model(WatchersWatch);
- if (model->objectName().isEmpty()) // Make debugging easier.
- model->setObjectName(objectName() + QLatin1String("WatchersModel"));
- return model;
+ return watchHandler()->model();
}
QAbstractItemModel *DebuggerEngine::returnModel() const
{
- QAbstractItemModel *model = watchHandler()->model(ReturnWatch);
- if (model->objectName().isEmpty()) // Make debugging easier.
- model->setObjectName(objectName() + QLatin1String("ReturnModel"));
- return model;
+ return watchHandler()->model();
}
QAbstractItemModel *DebuggerEngine::inspectorModel() const
{
- QAbstractItemModel *model = watchHandler()->model(InspectWatch);
- if (model->objectName().isEmpty()) // Make debugging easier.
- model->setObjectName(objectName() + QLatin1String("InspectorModel"));
- return model;
+ return watchHandler()->model();
}
QAbstractItemModel *DebuggerEngine::toolTipsModel() const
{
- QAbstractItemModel *model = watchHandler()->model(TooltipsWatch);
- if (model->objectName().isEmpty()) // Make debugging easier.
- model->setObjectName(objectName() + QLatin1String("TooltipsModel"));
- return model;
+ return watchHandler()->model();
+}
+
+QAbstractItemModel *DebuggerEngine::watchModel() const
+{
+ return watchHandler()->model();
}
QAbstractItemModel *DebuggerEngine::sourceFilesModel() const