Changeset View
Changeset View
Standalone View
Standalone View
debugger/variablecontroller.cpp
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 109 | { | |||
---|---|---|---|---|---|
129 | QList<KDevelop::Variable*> variableObjects = KDevelop::ICore::self()->debugController()->variableCollection() | 129 | QList<KDevelop::Variable*> variableObjects = KDevelop::ICore::self()->debugController()->variableCollection() | ||
130 | ->locals()->updateLocals(vars); | 130 | ->locals()->updateLocals(vars); | ||
131 | for ( int i = 0; i < variableObjects.length(); i++ ) { | 131 | for ( int i = 0; i < variableObjects.length(); i++ ) { | ||
132 | KDevelop::Variable* v = variableObjects[i]; | 132 | KDevelop::Variable* v = variableObjects[i]; | ||
133 | 133 | | |||
134 | auto model = v->model(); | 134 | auto model = v->model(); | ||
135 | auto parent = model->indexForItem(v, 0); | 135 | auto parent = model->indexForItem(v, 0); | ||
136 | auto childCount = v->model()->rowCount(parent); | 136 | auto childCount = v->model()->rowCount(parent); | ||
137 | qDebug() << "updating:" << v->expression() << "active children:" << childCount; | 137 | qCDebug(KDEV_PYTHON_DEBUGGER) << "updating:" << v->expression() << "active children:" << childCount; | ||
138 | for ( int j = 0; j < childCount; j++ ) { | 138 | for ( int j = 0; j < childCount; j++ ) { | ||
139 | auto index = model->index(j, 0, parent); | 139 | auto index = model->index(j, 0, parent); | ||
140 | auto child = static_cast<KDevelop::TreeItem*>(index.internalPointer()); | 140 | auto child = static_cast<KDevelop::TreeItem*>(index.internalPointer()); | ||
141 | if ( auto childVariable = qobject_cast<Variable*>(child) ) { | 141 | if ( auto childVariable = qobject_cast<Variable*>(child) ) { | ||
142 | qDebug() << " got child var:" << childVariable->expression(); | 142 | qCDebug(KDEV_PYTHON_DEBUGGER) << " got child var:" << childVariable->expression(); | ||
143 | v->fetchMoreChildren(); | 143 | v->fetchMoreChildren(); | ||
144 | break; | 144 | break; | ||
145 | } | 145 | } | ||
146 | } | 146 | } | ||
147 | 147 | | |||
148 | v->setValue(values[v->expression()]); | 148 | v->setValue(values[v->expression()]); | ||
149 | v->setHasMoreInitial(true); | 149 | v->setHasMoreInitial(true); | ||
150 | } | 150 | } | ||
151 | } | 151 | } | ||
152 | 152 | | |||
153 | void VariableController::update() { | 153 | void VariableController::update() { | ||
154 | m_updateTimer.start(); | 154 | m_updateTimer.start(); | ||
155 | } | 155 | } | ||
156 | 156 | | |||
157 | void VariableController::_update() | 157 | void VariableController::_update() | ||
158 | { | 158 | { | ||
159 | qDebug() << " ************************* update requested"; | 159 | qCDebug(KDEV_PYTHON_DEBUGGER) << " ************************* update requested"; | ||
160 | DebugSession* d = static_cast<DebugSession*>(parent()); | 160 | DebugSession* d = static_cast<DebugSession*>(parent()); | ||
161 | if (autoUpdate() & UpdateWatches) { | 161 | if (autoUpdate() & UpdateWatches) { | ||
162 | variableCollection()->watches()->reinstall(); | 162 | variableCollection()->watches()->reinstall(); | ||
163 | } | 163 | } | ||
164 | 164 | | |||
165 | if (autoUpdate() & UpdateLocals) { | 165 | if (autoUpdate() & UpdateLocals) { | ||
166 | // TODO find a more elegant solution for this import! | 166 | // TODO find a more elegant solution for this import! | ||
167 | InternalPdbCommand* import = new InternalPdbCommand(0, 0, "import __kdevpython_debugger_utils\n"); | 167 | InternalPdbCommand* import = new InternalPdbCommand(0, 0, "import __kdevpython_debugger_utils\n"); | ||
Show All 9 Lines |