Debian Codegraph @

src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp

raw symbols SCIP
1 /****************************************************************************
2 **
3 ** Copyright (C) 2018 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtSCriptTools module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39
40 #include "qscriptdebuggerlocalsmodel_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerlocalsmodel_p.h`/
41 #include "qscriptdebuggercommandschedulerjob_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggercommandschedulerjob_p.h`/
42 #include "qscriptdebuggervalue_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggervalue_p.h`/
43 #include "qscriptdebuggerresponse_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerresponse_p.h`/
44 #include "qscriptdebuggerevent_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerevent_p.h`/
45 #include "qscriptdebuggervalueproperty_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h`/
46 #include "qscriptdebuggercommandschedulerinterface_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggercommandschedulerinterface_p.h`/
47 #include "qscriptdebuggercommandschedulerfrontend_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggercommandschedulerfrontend_p.h`/
48 #include "qscriptdebuggerjobschedulerinterface_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerjobschedulerinterface_p.h`/
49 #include "qscriptdebuggerobjectsnapshotdelta_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h`/
50
51 #include "private/qabstractitemmodel_p.h"
52
53 #include <QtCore/qdebug.h>
54 #include <QtCore/qcoreapplication.h>
55 #include <QtCore/qpointer.h>
56 #include <QtGui/qbrush.h>
57 #include <QtGui/qfont.h>
58
59 Q_DECLARE_METATYPEcxx . . $ `<external>/17491093664533580526/qmetatype.h:2056:9`!(QScriptDebuggerObjectSnapshotDelta)
60
61 QT_BEGIN_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:148:10`!
62
63 struct QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#
64 {
65 enum PopulationStatecxx . . $ QScriptDebuggerLocalsModelNode#PopulationState# {
66 NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.,
67 Populatingcxx . . $ QScriptDebuggerLocalsModelNode#Populating.,
68 Populatedcxx . . $ QScriptDebuggerLocalsModelNode#Populated.
69 };
70
71 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#QScriptDebuggerLocalsModelNode(49f6e7a06ebc5aa8).()
72 : parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.(0), populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState.(NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.), snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId.(-1), changedcxx . . $ QScriptDebuggerLocalsModelNode#changed.(false) {}
73
74 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#QScriptDebuggerLocalsModelNode(38e1b6f3c0149845).(
75 const QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# &prop,
76 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *par)
77 : property(prop), parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.(par),
78 populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState.(NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.), snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId.(-1), changedcxx . . $ QScriptDebuggerLocalsModelNode#changed.(false)
79 {
80 parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.->children.append(this);
81 }
82
83 ~cxx . . $ QScriptDebuggerLocalsModelNode#`~QScriptDebuggerLocalsModelNode`(ced63f7c635d850d).QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#() { qDeleteAllcxx . . $ qDeleteAll(77d9f17553126ecb).(children); }
84
85 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *findChildcxx . . $ QScriptDebuggerLocalsModelNode#findChild(25ede9e038541aa8).(const QStringcxx . . $ QString# &name)
86 {
87 for (int i = 0; i < children.size(); ++i) {
88 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *child = children.at(i);
89 if (child->property.name() ==cxx . . $ `operator==`(844795bf13b447e6). name)
90 return child;
91 }
92 return 0;
93 }
94
95 QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# propertycxx . . $ QScriptDebuggerLocalsModelNode#property.;
96 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.;
97 QListcxx . . $ QList#<QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#*> childrencxx . . $ QScriptDebuggerLocalsModelNode#children.;
98 PopulationStatecxx . . $ QScriptDebuggerLocalsModelNode#PopulationState# populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState.;
99 int snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId.;
100 bool changedcxx . . $ QScriptDebuggerLocalsModelNode#changed.;
101 };
102
103 class QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#
104 : public QAbstractItemModelPrivatecxx . . $ QAbstractItemModelPrivate#
105 {
106 Q_DECLARE_PUBLICcxx . . $ `<external>/15045578679651060896/qglobal.h:1172:9`!(QScriptDebuggerLocalsModel)
107 public:
108 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#QScriptDebuggerLocalsModelPrivate(49f6e7a06ebc5aa8).();
109 ~cxx . . $ QScriptDebuggerLocalsModelPrivate#`~QScriptDebuggerLocalsModelPrivate`(ced63f7c635d850d).QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#();
110
111 static QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *q);
112
113 QModelIndexcxx . . $ QModelIndex# addTopLevelObjectcxx . . $ QScriptDebuggerLocalsModelPrivate#addTopLevelObject(3440ab7dd3797ddf).(const QStringcxx . . $ QString# &name, const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &object);
114
115 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(const QModelIndexcxx . . $ QModelIndex# &index) const;
116 QModelIndexcxx . . $ QModelIndex# indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node) const;
117 bool isTopLevelNodecxx . . $ QScriptDebuggerLocalsModelPrivate#isTopLevelNode(b62460db548a07b1).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node) const;
118
119 void populateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#populateIndex(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# &index);
120 void reallyPopulateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#reallyPopulateIndex(dd45665bb19fa74c).(const QModelIndexcxx . . $ QModelIndex# &index,
121 const QScriptDebuggerValuePropertyListcxx . . $ QScriptDebuggerValuePropertyList# &props);
122 void syncIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#syncIndex(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# &index);
123 void reallySyncIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#reallySyncIndex(8b202454cdbe0805).(const QModelIndexcxx . . $ QModelIndex# &index,
124 const QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# &delta);
125 void syncTopLevelNodescxx . . $ QScriptDebuggerLocalsModelPrivate#syncTopLevelNodes(49f6e7a06ebc5aa8).();
126 void removeTopLevelNodescxx . . $ QScriptDebuggerLocalsModelPrivate#removeTopLevelNodes(49f6e7a06ebc5aa8).();
127 void emitScopeObjectAvailablecxx . . $ QScriptDebuggerLocalsModelPrivate#emitScopeObjectAvailable(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# &index);
128
129 void emitDataChangedcxx . . $ QScriptDebuggerLocalsModelPrivate#emitDataChanged(d855417dd4a40a0).(const QModelIndexcxx . . $ QModelIndex# &tl, const QModelIndexcxx . . $ QModelIndex# &br);
130 void removeChildcxx . . $ QScriptDebuggerLocalsModelPrivate#removeChild(6dd537924563c68e).(const QModelIndexcxx . . $ QModelIndex# &parentIndex,
131 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *parentNode, int row);
132 void depopulatecxx . . $ QScriptDebuggerLocalsModelPrivate#depopulate(3ecd720623ccc23c).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node);
133 void repopulatecxx . . $ QScriptDebuggerLocalsModelPrivate#repopulate(3ecd720623ccc23c).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node);
134 void addChildrencxx . . $ QScriptDebuggerLocalsModelPrivate#addChildren(d7ef0c5f9e6c8d9c).(const QModelIndexcxx . . $ QModelIndex# &parentIndex,
135 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *parentNode,
136 const QScriptDebuggerValuePropertyListcxx . . $ QScriptDebuggerValuePropertyList# &props);
137
138 void deleteObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteObjectSnapshots(e7e4d69fb7d8c7ed).(const QListcxx . . $ QList#<qint64cxx . . $ qint64#> &snapshotIds);
139 void deleteAllObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteAllObjectSnapshots(49f6e7a06ebc5aa8).();
140
141 QScriptDebuggerJobSchedulerInterfacecxx . . $ QScriptDebuggerJobSchedulerInterface# *jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.;
142 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.;
143 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.;
144 int frameIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#frameIndex.;
145 };
146
147 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#QScriptDebuggerLocalsModelPrivate(49f6e7a06ebc5aa8).()
148 {
149 invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode. = new QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#();
150 frameIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#frameIndex. = -1;
151 }
152
153 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::~cxx . . $ QScriptDebuggerLocalsModelPrivate#`~QScriptDebuggerLocalsModelPrivate`(ced63f7c635d850d).QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#()
154 {
155 delete invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.;
156 }
157
158 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::emitDataChangedcxx . . $ QScriptDebuggerLocalsModelPrivate#emitDataChanged(d855417dd4a40a0).(const QModelIndexcxx . . $ QModelIndex# &tl, const QModelIndexcxx . . $ QModelIndex# &br)
159 {
160 q_funccxx . . $ QScriptDebuggerLocalsModelPrivate#q_func(a877a4090058ae2c).()->dataChangedcxx . . $ QAbstractItemModel#dataChanged(ae8a85c811f0c28a).(tl, br);
161 }
162
163 static QListcxx . . $ QList#<qint64cxx . . $ qint64#> findSnapshotIdsRecursivelycxx . . $ findSnapshotIdsRecursively(9341781f1a1bf6e7).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *root)
164 {
165 QListcxx . . $ QList#<qint64cxx . . $ qint64#> result;
166 if (root->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId. == -1) {
167 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(root->children.isEmpty());
168 return result;
169 }
170 QListcxx . . $ QList#<QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#*> nodeStack;
171 nodeStack.append(root);
172 while (!nodeStack.isEmpty()) {
173 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = nodeStack.takeFirst();
174 result.append(node->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId.);
175 for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). node->children.count(); ++i) {
176 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *child = node->children.at(i);
177 if (child->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId. != -1)
178 nodeStack.prepend(child);
179 }
180 }
181 return result;
182 }
183
184 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::removeChildcxx . . $ QScriptDebuggerLocalsModelPrivate#removeChild(6dd537924563c68e).(const QModelIndexcxx . . $ QModelIndex# &parentIndex,
185 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *parentNode,
186 int row)
187 {
188 Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(QScriptDebuggerLocalsModel);
189 q->beginRemoveRowscxx . . $ QAbstractItemModel#beginRemoveRows(d1f44b3c3a3f9fa).(parentIndex, row, row);
190 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *child = parentNode->children.takeAt(row);
191 QListcxx . . $ QList#<qint64cxx . . $ qint64#> snapshotIds = findSnapshotIdsRecursively(child);
192 delete child;
193 q->endRemoveRowscxx . . $ QAbstractItemModel#endRemoveRows(49f6e7a06ebc5aa8).();
194 deleteObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteObjectSnapshots(e7e4d69fb7d8c7ed).(snapshotIds);
195 }
196
197 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::depopulatecxx . . $ QScriptDebuggerLocalsModelPrivate#depopulate(3ecd720623ccc23c).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node)
198 {
199 Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(QScriptDebuggerLocalsModel);
200 bool hasChildren = !node->children.isEmpty();
201 if (hasChildren)
202 q->beginRemoveRowscxx . . $ QAbstractItemModel#beginRemoveRows(d1f44b3c3a3f9fa).(indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(node), 0, node->children.count() -cxx . . $ operator-(e175dfd5a30d4536). 1);
203 QListcxx . . $ QList#<qint64cxx . . $ qint64#> snapshotIds = findSnapshotIdsRecursively(node);
204 qDeleteAllcxx . . $ qDeleteAll(77d9f17553126ecb).(node->children);
205 node->children.clear();
206 node->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId. = -1;
207 node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. = QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.;
208 if (hasChildren)
209 q->endRemoveRowscxx . . $ QAbstractItemModel#endRemoveRows(49f6e7a06ebc5aa8).();
210 deleteObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteObjectSnapshots(e7e4d69fb7d8c7ed).(snapshotIds);
211 }
212
213 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::repopulatecxx . . $ QScriptDebuggerLocalsModelPrivate#repopulate(3ecd720623ccc23c).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node)
214 {
215 if (node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. != QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::Populatedcxx . . $ QScriptDebuggerLocalsModelNode#Populated.)
216 return;
217 depopulatecxx . . $ QScriptDebuggerLocalsModelPrivate#depopulate(3ecd720623ccc23c).(node);
218 if (node->property.value().type() ==cxx . . $ `operator==`(844795bf13b447e6). QScriptDebuggerValuecxx . . $ QScriptDebuggerValue#::ObjectValuecxx . . $ QScriptDebuggerValue#ObjectValue.)
219 populateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#populateIndex(87a6de385263c395).(indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(node));
220 }
221
222 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::addChildrencxx . . $ QScriptDebuggerLocalsModelPrivate#addChildren(d7ef0c5f9e6c8d9c).(const QModelIndexcxx . . $ QModelIndex# &parentIndex,
223 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *parentNode,
224 const QScriptDebuggerValuePropertyListcxx . . $ QScriptDebuggerValuePropertyList# &props)
225 {
226 Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(QScriptDebuggerLocalsModel);
227 if (props.isEmpty())
228 return;
229 int first = parentNode->children.size();
230 int last = first +cxx . . $ operator+(e175dfd5a30d4536). props.size() -cxx . . $ operator-(e175dfd5a30d4536). 1;
231 q->beginInsertRowscxx . . $ QAbstractItemModel#beginInsertRows(d1f44b3c3a3f9fa).(parentIndex, first, last);
232 for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). props.size(); ++i)
233 new QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#(props.at(i), parentNode);
234 q->endInsertRowscxx . . $ QAbstractItemModel#endInsertRows(49f6e7a06ebc5aa8).();
235 }
236
237 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::deleteObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteObjectSnapshots(e7e4d69fb7d8c7ed).(const QListcxx . . $ QList#<qint64cxx . . $ qint64#> &snapshotIds)
238 {
239 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend#QScriptDebuggerCommandSchedulerFrontend(ede93245c2b5b516).(commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler., 0);
240 for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). snapshotIds.size(); ++i)
241 frontend.scheduleDeleteScriptObjectSnapshotcxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleDeleteScriptObjectSnapshot(7864480464b09eea).(snapshotIds.at(i));
242 }
243
244 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::deleteAllObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteAllObjectSnapshots(49f6e7a06ebc5aa8).()
245 {
246 QListcxx . . $ QList#<qint64cxx . . $ qint64#> snapshotIds;
247 for (int i = 0; i < invisibleRootNode->children.count(); ++i)
248 snapshotIds += findSnapshotIdsRecursively(invisibleRootNode->children.at(i));
249 deleteObjectSnapshotscxx . . $ QScriptDebuggerLocalsModelPrivate#deleteObjectSnapshots(e7e4d69fb7d8c7ed).(snapshotIds);
250 }
251
252 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *q)
253 {
254 return q->d_funccxx . . $ QScriptDebuggerLocalsModel#d_func(d878420cd6ee1b93).();
255 }
256
257 namespacecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/ {
258
259 class SetPropertyJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob# : public QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#
260 {
261 public:
262 SetPropertyJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#SetPropertyJob(d3eaa3399e9472d7).(const QPersistentModelIndexcxx . . $ QPersistentModelIndex# &index,
263 const QStringcxx . . $ QString# &expression,
264 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *scheduler)
265 : QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#(scheduler),
266 m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index.(index), m_expressioncxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_expression.(expression), m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_state.(0) {}
267
268 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#model(a38f45015644ec98).() const
269 {
270 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).())
271 return 0;
272 QAbstractItemModelcxx . . $ QAbstractItemModel# *m = const_cast<QAbstractItemModelcxx . . $ QAbstractItemModel#*>(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index..modelcxx . . $ QPersistentModelIndex#model(a5d3f0f2e9e3bd17).());
273 QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *lm = qobject_castcxx . . $ qobject_cast(529b296f76edd7b).<QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#*>(m);
274 return QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(lm);
275 }
276
277 void startcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#start(49f6e7a06ebc5aa8).()
278 {
279 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).()) {
280 // nothing to do, the node has been removed
281 return;
282 }
283 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#model(a38f45015644ec98).()->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index.);
284 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
285 frontend.scheduleEvaluatecxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleEvaluate(2db804e1137cdb08).(modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#model(a38f45015644ec98).()->frameIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#frameIndex., m_expressioncxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_expression.,
286 QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("set property '%0' (%1)")
287 .argcxx . . $ QString#arg(ec0c7a4bb7c7a5fe).(node->property.name())
288 .arg(QDateTimecxx . . $ QDateTime#::currentDateTimecxx . . $ QDateTime#currentDateTime(bf5129c8228c71c0).().toStringcxx . . $ QDateTime#toString(7b7e68bded046f2f).()));
289 }
290
291 void handleResponsecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#handleResponse(46b5ea012c87a176).(const QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# &, int)
292 {
293 switch (m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_state.) {
294 case 0:
295 hibernateUntilEvaluateFinishedcxx . . $ QScriptDebuggerJob#hibernateUntilEvaluateFinished(49f6e7a06ebc5aa8).();
296 ++m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_state.;
297 break;
298 case 1:
299 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
300 break;
301 }
302 }
303
304 void evaluateFinishedcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#evaluateFinished(98e9fe25954e1086).(const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &result)
305 {
306 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).()) {
307 // nothing to do, the node has been removed
308 return;
309 }
310 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#model(a38f45015644ec98).()->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index.);
311 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(node->parent != 0);
312 QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# object = node->parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.->property.value();
313 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
314 frontend.scheduleSetScriptValuePropertycxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleSetScriptValueProperty(8491a76801129bb3).(object, node->property.name(), result);
315 }
316
317 private:
318 QPersistentModelIndexcxx . . $ QPersistentModelIndex# m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_index.;
319 QStringcxx . . $ QString# m_expressioncxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_expression.;
320 int m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#m_state.;
321 };
322
323 } // namespace
324
325 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(
326 const QModelIndexcxx . . $ QModelIndex# &index) const
327 {
328 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
329 return invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.;
330 return static_cast<QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#*>(index.internalPointercxx . . $ QModelIndex#internalPointer(9c85a4740a0511c5).());
331 }
332
333 QModelIndexcxx . . $ QModelIndex# QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(
334 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node) const
335 {
336 if (!node || (node == invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.))
337 return QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).();
338 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *par = node->parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.;
339 int row = par ? par->children.indexOf(node) : 0;
340 return createIndexcxx . . $ QAbstractItemModelPrivate#createIndex(ec74543ca13990c5).(row, 0, node);
341 }
342
343 bool QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::isTopLevelNodecxx . . $ QScriptDebuggerLocalsModelPrivate#isTopLevelNode(b62460db548a07b1).(QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node) const
344 {
345 return node && (node->parentcxx . . $ QScriptDebuggerLocalsModelNode#parent. == invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.);
346 }
347
348 namespacecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/ {
349
350 class PopulateModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob# : public QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#
351 {
352 public:
353 PopulateModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#PopulateModelIndexJob(20e8f47cc5a9d7a6).(const QPersistentModelIndexcxx . . $ QPersistentModelIndex# &index,
354 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *scheduler)
355 : QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#(scheduler),
356 m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index.(index), m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_state.(0)
357 { }
358
359 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#model(a38f45015644ec98).() const
360 {
361 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).())
362 return 0;
363 QAbstractItemModelcxx . . $ QAbstractItemModel# *m = const_cast<QAbstractItemModelcxx . . $ QAbstractItemModel#*>(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index..modelcxx . . $ QPersistentModelIndex#model(a5d3f0f2e9e3bd17).());
364 QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *lm = qobject_castcxx . . $ qobject_cast(529b296f76edd7b).<QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#*>(m);
365 return QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(lm);
366 }
367
368 void startcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#start(49f6e7a06ebc5aa8).()
369 {
370 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).()) {
371 // nothing to do, the node has been removed
372 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
373 return;
374 }
375 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
376 frontend.scheduleNewScriptObjectSnapshotcxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleNewScriptObjectSnapshot(b126dc7c1de90089).();
377 }
378
379 void handleResponsecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#handleResponse(46b5ea012c87a176).(const QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# &response,
380 int)
381 {
382 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).()) {
383 // the node has been removed
384 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
385 return;
386 }
387 switch (m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_state.) {
388 case 0: {
389 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#model(a38f45015644ec98).()->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index.);
390 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(node->populationState == QScriptDebuggerLocalsModelNode::Populating);
391 node->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId. = response.resultAsIntcxx . . $ QScriptDebuggerResponse#resultAsInt(455f465bc33b4cdf).();
392 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
393 frontend.scheduleScriptObjectSnapshotCapturecxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleScriptObjectSnapshotCapture(f0089cc06c16ddf8).(node->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId., node->property.value());
394 ++m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_state.;
395 } break;
396 case 1: {
397 QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# delta;
398 delta = qvariant_castcxx . . $ qvariant_cast(c08a979ef106920f).<QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta#>(response.resultcxx . . $ QScriptDebuggerResponse#result(23280f95d1ccaa1f).());
399 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(delta.removedProperties.isEmpty());
400 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(delta.changedProperties.isEmpty());
401 QScriptDebuggerValuePropertyListcxx . . $ QScriptDebuggerValuePropertyList# props = delta.addedProperties;
402 modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#model(a38f45015644ec98).()->reallyPopulateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#reallyPopulateIndex(dd45665bb19fa74c).(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index., props);
403 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
404 } break;
405 }
406 }
407
408 private:
409 QPersistentModelIndexcxx . . $ QPersistentModelIndex# m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_index.;
410 int m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#m_state.;
411 };
412
413 } // namespace
414
415 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::populateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#populateIndex(87a6de385263c395).(
416 const QModelIndexcxx . . $ QModelIndex# &index)
417 {
418 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
419 return;
420 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
421 if (node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. != QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.)
422 return;
423 if (node->property.value().type() !=cxx . . $ `operator!=`(844795bf13b447e6). QScriptDebuggerValuecxx . . $ QScriptDebuggerValue#::ObjectValuecxx . . $ QScriptDebuggerValue#ObjectValue.)
424 return;
425 node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. = QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::Populatingcxx . . $ QScriptDebuggerLocalsModelNode#Populating.;
426 QScriptDebuggerJobcxx . . $ QScriptDebuggerJob# *job = new PopulateModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/PopulateModelIndexJob#(indexcxx . . $ QPersistentModelIndex#QPersistentModelIndex(87a6de385263c395)., commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.);
427 jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.->scheduleJobcxx . . $ QScriptDebuggerJobSchedulerInterface#scheduleJob(40f7c20f23bab508).(job);
428 }
429
430 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::reallyPopulateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#reallyPopulateIndex(dd45665bb19fa74c).(
431 const QModelIndexcxx . . $ QModelIndex# &index,
432 const QScriptDebuggerValuePropertyListcxx . . $ QScriptDebuggerValuePropertyList# &props)
433 {
434 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
435 return;
436 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
437 Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(node->populationState == QScriptDebuggerLocalsModelNode::Populating);
438 node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. = QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::Populatedcxx . . $ QScriptDebuggerLocalsModelNode#Populated.;
439 addChildrencxx . . $ QScriptDebuggerLocalsModelPrivate#addChildren(d7ef0c5f9e6c8d9c).(index, node, props);
440 }
441
442 QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#QScriptDebuggerLocalsModel(ee0a2b3b99d18a5c).(
443 QScriptDebuggerJobSchedulerInterfacecxx . . $ QScriptDebuggerJobSchedulerInterface# *jobScheduler,
444 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *commandScheduler,
445 QObjectcxx . . $ QObject# *parent)
446 : QAbstractItemModelcxx . . $ QAbstractItemModel#(*new QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#QScriptDebuggerLocalsModelPrivate(49f6e7a06ebc5aa8)., parent)
447 {
448 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(QScriptDebuggerLocalsModel);
449 d->jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler. = jobScheduler;
450 d->commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler. = commandScheduler;
451 }
452
453 QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::~cxx . . $ QScriptDebuggerLocalsModel#`~QScriptDebuggerLocalsModel`(ced63f7c635d850d).QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#()
454 {
455 }
456
457 QModelIndexcxx . . $ QModelIndex# QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::addTopLevelObjectcxx . . $ QScriptDebuggerLocalsModelPrivate#addTopLevelObject(3440ab7dd3797ddf).(const QStringcxx . . $ QString# &name, const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &object)
458 {
459 Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(QScriptDebuggerLocalsModel);
460 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.->findChildcxx . . $ QScriptDebuggerLocalsModelNode#findChild(25ede9e038541aa8).(name);
461 if (node)
462 return indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(node);
463 QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# prop(name, object,
464 QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).(""), // ### string representation of object
465 QScriptValue::PropertyFlags{});
466 int rowIndex = invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.->children.size();
467 q->beginInsertRowscxx . . $ QAbstractItemModel#beginInsertRows(d1f44b3c3a3f9fa).(QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).(), rowIndex, rowIndex);
468 node = new QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#(prop, invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.);
469 q->endInsertRowscxx . . $ QAbstractItemModel#endInsertRows(49f6e7a06ebc5aa8).();
470 return indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(node);
471 }
472
473 namespacecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/ {
474
475 class InitModelJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob# : public QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#
476 {
477 public:
478 InitModelJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#InitModelJob(66996ba3cfedb125).(QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *model,
479 int frameIndex,
480 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *scheduler)
481 : QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#(scheduler),
482 m_model(model), m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_frameIndex.(frameIndex), m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_state.(0)
483 { }
484
485 void startcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#start(49f6e7a06ebc5aa8).()
486 {
487 if (!m_model) {
488 // Model has been deleted.
489 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
490 return;
491 }
492 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
493 frontend.scheduleGetScopeChaincxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleGetScopeChain(7864480464b09eea).(m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_frameIndex.);
494 }
495
496 void handleResponsecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#handleResponse(46b5ea012c87a176).(const QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# &response,
497 int)
498 {
499 if (!m_model) {
500 // Model has been deleted.
501 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
502 return;
503 }
504 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
505 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *model_d = QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(m_model);
506 switch (m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_state.) {
507 case 0: {
508 QScriptDebuggerValueListcxx . . $ QScriptDebuggerValueList# scopeChain = response.resultAsScriptValueList();
509 for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). scopeChain.size(); ++i) {
510 const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &scopeObject = scopeChain.at(i);
511 QStringcxx . . $ QString# name = QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Scope");
512 if (i > 0)
513 name.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).(" (%0)").argcxx . . $ QString#arg(64ab2ed17cc11715).(i));
514 QModelIndexcxx . . $ QModelIndex# index = model_d->addTopLevelObjectcxx . . $ QScriptDebuggerLocalsModelPrivate#addTopLevelObject(3440ab7dd3797ddf).(name, scopeObject);
515 if (i == 0)
516 model_d->emitScopeObjectAvailablecxx . . $ QScriptDebuggerLocalsModelPrivate#emitScopeObjectAvailable(87a6de385263c395).(index);
517 }
518 frontend.scheduleGetThisObjectcxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleGetThisObject(7864480464b09eea).(m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_frameIndex.);
519 ++m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_state.;
520 } break;
521 case 1: {
522 QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# thisObject = response.resultAsScriptValuecxx . . $ QScriptDebuggerResponse#resultAsScriptValue(73c7f2fc16c9f19c).();
523 model_d->addTopLevelObjectcxx . . $ QScriptDebuggerLocalsModelPrivate#addTopLevelObject(3440ab7dd3797ddf).(QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("this"), thisObject);
524 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
525 } break;
526 }
527 }
528
529 private:
530 QPointercxx . . $ QPointer#<QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#> m_modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_model.;
531 int m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_frameIndex.;
532 int m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#m_state.;
533 };
534
535 } // namespace
536
537 void QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::initcxx . . $ QScriptDebuggerLocalsModel#init(d4f767463ce0a6b3).(int frameIndex)
538 {
539 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(QScriptDebuggerLocalsModel);
540 d->frameIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#frameIndex. = frameIndex;
541 QScriptDebuggerJobcxx . . $ QScriptDebuggerJob# *job = new InitModelJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/InitModelJob#(this, frameIndex, d->commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.);
542 d->jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.->scheduleJobcxx . . $ QScriptDebuggerJobSchedulerInterface#scheduleJob(40f7c20f23bab508).(job);
543 }
544
545 namespacecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/ {
546
547 class SyncModelJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob# : public QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#
548 {
549 public:
550 SyncModelJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#SyncModelJob(66996ba3cfedb125).(QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *model,
551 int frameIndex,
552 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *scheduler)
553 : QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#(scheduler),
554 m_model(model), m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_frameIndex.(frameIndex), m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_state.(0)
555 { }
556
557 void startcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#start(49f6e7a06ebc5aa8).()
558 {
559 if (!m_model) {
560 // Model has been deleted.
561 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
562 return;
563 }
564 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
565 frontend.scheduleGetScopeChaincxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleGetScopeChain(7864480464b09eea).(m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_frameIndex.);
566 }
567
568 void handleResponsecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#handleResponse(46b5ea012c87a176).(const QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# &response,
569 int)
570 {
571 if (!m_model) {
572 // Model has been deleted.
573 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
574 return;
575 }
576 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
577 switch (m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_state.) {
578 case 0: {
579 QScriptDebuggerValueListcxx . . $ QScriptDebuggerValueList# scopeChain = response.resultAsScriptValueList();
580 m_topLevelObjects << scopeChain;
581 frontend.scheduleGetThisObjectcxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleGetThisObject(7864480464b09eea).(m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_frameIndex.);
582 ++m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_state.;
583 } break;
584 case 1: {
585 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *model_d = QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(m_model);
586 QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# thisObject = response.resultAsScriptValuecxx . . $ QScriptDebuggerResponse#resultAsScriptValue(73c7f2fc16c9f19c).();
587 m_topLevelObjects.append(thisObject);
588 bool equal = (m_topLevelObjects.size() == model_d->invisibleRootNode->children.size());
589 for (int i = 0; equal && (i < m_topLevelObjects.size()); ++i) {
590 const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &object = m_topLevelObjects.at(i);
591 equal = (object ==cxx . . $ `operator==`(844795bf13b447e6). model_d->invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.->children.at(i)->property.value());
592 }
593 if (!equal) {
594 // the scope chain and/or this-object changed, so invalidate the model.
595 // we could try to be more clever, i.e. figure out
596 // exactly which objects were popped/pushed
597 model_d->removeTopLevelNodescxx . . $ QScriptDebuggerLocalsModelPrivate#removeTopLevelNodes(49f6e7a06ebc5aa8).();
598 for (int j = 0; j < m_topLevelObjects.size(); ++j) {
599 const QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# &object = m_topLevelObjects.at(j);
600 QStringcxx . . $ QString# namecxx . . $ QString#QString(ced63f7c635d850d).;
601 if (j == m_topLevelObjects.size()-1) {
602 name =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("this");
603 } else {
604 name =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("Scope");
605 if (j > 0)
606 name.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).(" (%0)").argcxx . . $ QString#arg(64ab2ed17cc11715).(j));
607 }
608 QModelIndexcxx . . $ QModelIndex# index = model_d->addTopLevelObjectcxx . . $ QScriptDebuggerLocalsModelPrivate#addTopLevelObject(3440ab7dd3797ddf).(name, object);
609 if (j == 0)
610 model_d->emitScopeObjectAvailablecxx . . $ QScriptDebuggerLocalsModelPrivate#emitScopeObjectAvailable(87a6de385263c395).(index);
611 }
612 } else {
613 model_d->syncTopLevelNodescxx . . $ QScriptDebuggerLocalsModelPrivate#syncTopLevelNodes(49f6e7a06ebc5aa8).();
614 }
615 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
616 } break;
617 }
618 }
619
620 private:
621 QPointercxx . . $ QPointer#<QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#> m_modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_model.;
622 int m_frameIndexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_frameIndex.;
623 int m_statecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_state.;
624 QScriptDebuggerValueListcxx . . $ QScriptDebuggerValueList# m_topLevelObjectscxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#m_topLevelObjects.;
625 };
626
627 } // namespace
628
629 void QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::synccxx . . $ QScriptDebuggerLocalsModel#sync(d4f767463ce0a6b3).(int frameIndex)
630 {
631 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(QScriptDebuggerLocalsModel);
632 d->frameIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#frameIndex. = frameIndex;
633 QScriptDebuggerJobcxx . . $ QScriptDebuggerJob# *job = new SyncModelJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelJob#(this, frameIndex, d->commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.);
634 d->jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.->scheduleJobcxx . . $ QScriptDebuggerJobSchedulerInterface#scheduleJob(40f7c20f23bab508).(job);
635 }
636
637 namespacecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/ {
638
639 class SyncModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob# : public QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#
640 {
641 public:
642 SyncModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#SyncModelIndexJob(20e8f47cc5a9d7a6).(const QPersistentModelIndexcxx . . $ QPersistentModelIndex# &index,
643 QScriptDebuggerCommandSchedulerInterfacecxx . . $ QScriptDebuggerCommandSchedulerInterface# *scheduler)
644 : QScriptDebuggerCommandSchedulerJobcxx . . $ QScriptDebuggerCommandSchedulerJob#(scheduler),
645 m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index.(index)
646 { }
647
648 QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate# *modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#model(a38f45015644ec98).() const
649 {
650 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).())
651 return 0;
652 QAbstractItemModelcxx . . $ QAbstractItemModel# *m = const_cast<QAbstractItemModelcxx . . $ QAbstractItemModel#*>(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index..modelcxx . . $ QPersistentModelIndex#model(a5d3f0f2e9e3bd17).());
653 QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel# *lm = qobject_castcxx . . $ qobject_cast(529b296f76edd7b).<QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#*>(m);
654 return QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::getcxx . . $ QScriptDebuggerLocalsModelPrivate#get(d69d9fcc86e2e211).(lm);
655 }
656
657 void startcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#start(49f6e7a06ebc5aa8).()
658 {
659 if (!m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index..isValidcxx . . $ QPersistentModelIndex#isValid(50ce9a9e25b4a850).()) {
660 // nothing to do, the node has been removed
661 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
662 return;
663 }
664 QScriptDebuggerCommandSchedulerFrontendcxx . . $ QScriptDebuggerCommandSchedulerFrontend# frontend(commandSchedulercxx . . $ QScriptDebuggerCommandSchedulerJob#commandScheduler(80d89317ed956ed9).(), this);
665 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#model(a38f45015644ec98).()->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index.);
666 frontend.scheduleScriptObjectSnapshotCapturecxx . . $ QScriptDebuggerCommandSchedulerFrontend#scheduleScriptObjectSnapshotCapture(f0089cc06c16ddf8).(node->snapshotIdcxx . . $ QScriptDebuggerLocalsModelNode#snapshotId., node->property.value());
667 }
668
669 void handleResponsecxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#handleResponse(46b5ea012c87a176).(const QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# &response,
670 int)
671 {
672 QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# delta;
673 delta = qvariant_castcxx . . $ qvariant_cast(c08a979ef106920f).<QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta#>(response.resultcxx . . $ QScriptDebuggerResponse#result(23280f95d1ccaa1f).());
674 modelcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#model(a38f45015644ec98).()->reallySyncIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#reallySyncIndex(8b202454cdbe0805).(m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index., delta);
675 finishcxx . . $ QScriptDebuggerJob#finish(49f6e7a06ebc5aa8).();
676 }
677
678 private:
679 QPersistentModelIndexcxx . . $ QPersistentModelIndex# m_indexcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#m_index.;
680 };
681
682 } // namespace
683
684 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::syncIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#syncIndex(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# &index)
685 {
686 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
687 return;
688 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
689 if (node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. != QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::Populatedcxx . . $ QScriptDebuggerLocalsModelNode#Populated.)
690 return;
691 QScriptDebuggerJobcxx . . $ QScriptDebuggerJob# *job = new SyncModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#(indexcxx . . $ QPersistentModelIndex#QPersistentModelIndex(87a6de385263c395)., commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.);
692 jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.->scheduleJobcxx . . $ QScriptDebuggerJobSchedulerInterface#scheduleJob(40f7c20f23bab508).(job);
693 }
694
695 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::reallySyncIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#reallySyncIndex(8b202454cdbe0805).(const QModelIndexcxx . . $ QModelIndex# &index,
696 const QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# &delta)
697 {
698 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
699 return;
700 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
701 // update or remove existing children
702 for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). node->children.count(); ++i) {
703 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *child = node->children.at(i);
704 int j;
705 for (j = 0; j <cxx . . $ `operator<`(9d1caf642710d3b0). delta.changedProperties.count(); ++j) {
706 if (child->property.name() ==cxx . . $ `operator==`(844795bf13b447e6). delta.changedProperties.at(j).name()) {
707 child->property = delta.changedProperties.at(j);
708 child->changedcxx . . $ QScriptDebuggerLocalsModelNode#changed. = true;
709 emitDataChangedcxx . . $ QScriptDebuggerLocalsModelPrivate#emitDataChanged(d855417dd4a40a0).(index, index.siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(0, 1));
710 repopulatecxx . . $ QScriptDebuggerLocalsModelPrivate#repopulate(3ecd720623ccc23c).(child);
711 break;
712 }
713 }
714 if (j !=cxx . . $ `operator!=`(844795bf13b447e6). delta.changedProperties.count())
715 continue; // was changed
716 for (j = 0; j <cxx . . $ `operator<`(9d1caf642710d3b0). delta.removedProperties.count(); ++j) {
717 if (child->property.name() ==cxx . . $ `operator==`(844795bf13b447e6). delta.removedProperties.at(j)) {
718 removeChildcxx . . $ QScriptDebuggerLocalsModelPrivate#removeChild(6dd537924563c68e).(index, node, i);
719 --i;
720 break;
721 }
722 }
723 if (j !=cxx . . $ `operator!=`(844795bf13b447e6). delta.removedProperties.count())
724 continue; // was removed
725 // neither changed nor removed, but its children might be
726 if (child->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. == QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::Populatedcxx . . $ QScriptDebuggerLocalsModelNode#Populated.) {
727 QScriptDebuggerJobcxx . . $ QScriptDebuggerJob# *job = new SyncModelIndexJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SyncModelIndexJob#(indexFromNodecxx . . $ QPersistentModelIndex#QPersistentModelIndex(87a6de385263c395).(child), commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.);
728 jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.->scheduleJobcxx . . $ QScriptDebuggerJobSchedulerInterface#scheduleJob(40f7c20f23bab508).(job);
729 }
730 }
731 addChildrencxx . . $ QScriptDebuggerLocalsModelPrivate#addChildren(d7ef0c5f9e6c8d9c).(index, node, delta.addedProperties);
732 }
733
734 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::syncTopLevelNodescxx . . $ QScriptDebuggerLocalsModelPrivate#syncTopLevelNodes(49f6e7a06ebc5aa8).()
735 {
736 Q_Qcxx . . $ `<external>/15045578679651060896/qglobal.h:1178:9`!(QScriptDebuggerLocalsModel);
737 for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.->children.count(); ++i) {
738 QModelIndexcxx . . $ QModelIndex# index = q->indexcxx . . $ QScriptDebuggerLocalsModel#index(37dbccf64c4e392).(i, 0, QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).());
739 syncIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#syncIndex(87a6de385263c395).(index);
740 if (i == 0)
741 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! q->scopeObjectAvailablecxx . . $ QScriptDebuggerLocalsModel#scopeObjectAvailable(87a6de385263c395).(index);
742 }
743 }
744
745 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::removeTopLevelNodescxx . . $ QScriptDebuggerLocalsModelPrivate#removeTopLevelNodes(49f6e7a06ebc5aa8).()
746 {
747 while (!invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode.->children.isEmpty())
748 removeChildcxx . . $ QScriptDebuggerLocalsModelPrivate#removeChild(6dd537924563c68e).(QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).(), invisibleRootNodecxx . . $ QScriptDebuggerLocalsModelPrivate#invisibleRootNode., 0);
749 }
750
751 void QScriptDebuggerLocalsModelPrivatecxx . . $ QScriptDebuggerLocalsModelPrivate#::emitScopeObjectAvailablecxx . . $ QScriptDebuggerLocalsModelPrivate#emitScopeObjectAvailable(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# &index)
752 {
753 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! q_funccxx . . $ QScriptDebuggerLocalsModelPrivate#q_func(a877a4090058ae2c).()->scopeObjectAvailablecxx . . $ QScriptDebuggerLocalsModel#scopeObjectAvailable(87a6de385263c395).(index);
754 }
755
756 int QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::frameIndexcxx . . $ QScriptDebuggerLocalsModel#frameIndex(455f465bc33b4cdf).() const
757 {
758 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
759 return d->frameIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#frameIndex.;
760 }
761
762 /*!
763 \reimp
764 */
765 QModelIndexcxx . . $ QModelIndex# QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::indexcxx . . $ QScriptDebuggerLocalsModel#index(37dbccf64c4e392).(int row, int column, const QModelIndexcxx . . $ QModelIndex# &parent) const
766 {
767 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
768 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(parent);
769 if ((row < 0) || (row >=cxx . . $ `operator>=`(489f5a20d57ffae2). node->children.count()))
770 return QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).();
771 return createIndexcxx . . $ QAbstractItemModel#createIndex(61b1598615bb0ee0).(row, column, node->children.at(row));
772 }
773
774 /*!
775 \reimp
776 */
777 QModelIndexcxx . . $ QModelIndex# QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::parentcxx . . $ QScriptDebuggerLocalsModel#parent(f800c6f2fa4cbe57).(const QModelIndexcxx . . $ QModelIndex# &index) const
778 {
779 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
780 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
781 return QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).();
782 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
783 return d->indexFromNodecxx . . $ QScriptDebuggerLocalsModelPrivate#indexFromNode(2806f8a48ef21355).(node->parentcxx . . $ QScriptDebuggerLocalsModelNode#parent.);
784 }
785
786 /*!
787 \reimp
788 */
789 int QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::columnCountcxx . . $ QScriptDebuggerLocalsModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &) const
790 {
791 return 2;
792 }
793
794 /*!
795 \reimp
796 */
797 int QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::rowCountcxx . . $ QScriptDebuggerLocalsModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &parent) const
798 {
799 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
800 // ### need this to make it work with a sortfilterproxymodel (QSFPM is too eager)
801 const_cast<QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#*>(this)->fetchMorecxx . . $ QScriptDebuggerLocalsModel#fetchMore(87a6de385263c395).(parent);
802 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(parent);
803 return node ? node->children.count() : 0;
804 }
805
806 /*!
807 \reimp
808 */
809 QVariantcxx . . $ QVariant# QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::datacxx . . $ QScriptDebuggerLocalsModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# &index, int role) const
810 {
811 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
812 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
813 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
814 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
815 if (role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) {
816 if (index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).() == 0)
817 return node->property.name();
818 else if (index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).() == 1) {
819 QStringcxx . . $ QString# str = node->property.valueAsString();
820 if (str.indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n')) != -1) {
821 QStringListcxx . . $ QStringList# lines = str.splitcxx . . $ QString#split(92030b8bf74e4227).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n'));
822 int lineCount = lines.size();
823 if (lineCount > 1) {
824 lines = lines.mid(0, 1);
825 lines.append(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("(... %0 more lines ...)").argcxx . . $ QString#arg(64ab2ed17cc11715).(lineCount - 1));
826 }
827 str = lines.join(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("\n"));
828 }
829 return strcxx . . $ QVariant#QVariant(3520e46b33348bf6).;
830 }
831 } else if (role == Qtcxx . . $ Qt/::EditRolecxx . . $ Qt/EditRole.) {
832 if ((index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).() == 1) && !d->isTopLevelNodecxx . . $ QScriptDebuggerLocalsModelPrivate#isTopLevelNode(b62460db548a07b1).(node)) {
833 QStringcxx . . $ QString# str = node->property.valueAsString();
834 if (node->property.value().type() ==cxx . . $ `operator==`(844795bf13b447e6). QScriptDebuggerValuecxx . . $ QScriptDebuggerValue#::StringValuecxx . . $ QScriptDebuggerValue#StringValue.) {
835 // escape
836 str.replacecxx . . $ QString#replace(8e47db4decbc2d66).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\"'), QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("\\\""));
837 str.prependcxx . . $ QString#prepend(3a2ffbdf8ecc25e2).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\"'));
838 str.appendcxx . . $ QString#append(3a2ffbdf8ecc25e2).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\"'));
839 }
840 return strcxx . . $ QVariant#QVariant(3520e46b33348bf6).;
841 }
842 } else if (role == Qtcxx . . $ Qt/::ToolTipRolecxx . . $ Qt/ToolTipRole.) {
843 if (index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).() == 1) {
844 QStringcxx . . $ QString# str = node->property.valueAsString();
845 if (str.indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n')) != -1)
846 return strcxx . . $ QVariant#QVariant(3520e46b33348bf6).;
847 }
848 }
849 // ### do this in the delegate
850 else if (role == Qtcxx . . $ Qt/::BackgroundRolecxx . . $ Qt/BackgroundRole.) {
851 if (d->isTopLevelNodecxx . . $ QScriptDebuggerLocalsModelPrivate#isTopLevelNode(b62460db548a07b1).(node))
852 return QBrushcxx . . $ QBrush#QBrush(1975e3c608654284).(Qtcxx . . $ Qt/::darkGraycxx . . $ Qt/darkGray.);
853 } else if (role == Qtcxx . . $ Qt/::ForegroundRolecxx . . $ Qt/ForegroundRole.) {
854 if (d->isTopLevelNodecxx . . $ QScriptDebuggerLocalsModelPrivate#isTopLevelNode(b62460db548a07b1).(node))
855 return QColorcxx . . $ QColor#QColor(408ec4d5924bfb00).(Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.);
856 } else if (role == Qtcxx . . $ Qt/::FontRolecxx . . $ Qt/FontRole.) {
857 if (d->isTopLevelNodecxx . . $ QScriptDebuggerLocalsModelPrivate#isTopLevelNode(b62460db548a07b1).(node) || node->changedcxx . . $ QScriptDebuggerLocalsModelNode#changed.) {
858 QFontcxx . . $ QFont# fntcxx . . $ QFont#QFont(49f6e7a06ebc5aa8).;
859 fnt.setBoldcxx . . $ QFont#setBold(b45ddcbc8423892c).(true);
860 return fnt;
861 }
862 }
863 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
864 }
865
866 /*!
867 \reimp
868 */
869 bool QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::setDatacxx . . $ QScriptDebuggerLocalsModel#setData(6d1d8401440d0a2c).(const QModelIndexcxx . . $ QModelIndex# &index, const QVariantcxx . . $ QVariant# &value, int role)
870 {
871 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(QScriptDebuggerLocalsModel);
872 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
873 return false;
874 if (role != Qtcxx . . $ Qt/::EditRolecxx . . $ Qt/EditRole.)
875 return false;
876 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
877 if (!node)
878 return false;
879 QStringcxx . . $ QString# expr = value.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).().trimmedcxx . . $ QString#trimmed(30b3b70527b1c61a).();
880 if (expr.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).())
881 return false;
882 QScriptDebuggerJobcxx . . $ QScriptDebuggerJob# *job = new SetPropertyJobcxx . . $ `$anonymous_namespace_src/scripttools/debugging/qscriptdebuggerlocalsmodel.cpp`/SetPropertyJob#(indexcxx . . $ QPersistentModelIndex#QPersistentModelIndex(87a6de385263c395)., expr, d->commandSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#commandScheduler.);
883 d->jobSchedulercxx . . $ QScriptDebuggerLocalsModelPrivate#jobScheduler.->scheduleJobcxx . . $ QScriptDebuggerJobSchedulerInterface#scheduleJob(40f7c20f23bab508).(job);
884 return true;
885 }
886
887 /*!
888 \reimp
889 */
890 QVariantcxx . . $ QVariant# QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::headerDatacxx . . $ QScriptDebuggerLocalsModel#headerData(b8cfec0985494997).(int section, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orient, int role) const
891 {
892 if (orient == Qtcxx . . $ Qt/::Horizontalcxx . . $ Qt/Horizontal.) {
893 if (role == Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) {
894 if (section == 0)
895 return QCoreApplicationcxx . . $ QVariant#QVariant(3520e46b33348bf6).::translatecxx . . $ QCoreApplication#translate(699330408c757f1b).("QScriptDebuggerLocalsModel", "Name");
896 else if (section == 1)
897 return QCoreApplicationcxx . . $ QVariant#QVariant(3520e46b33348bf6).::translatecxx . . $ QCoreApplication#translate(699330408c757f1b).("QScriptDebuggerLocalsModel", "Value");
898 }
899 }
900 return QVariantcxx . . $ QVariant#QVariant(ced63f7c635d850d).();
901 }
902
903 /*!
904 \reimp
905 */
906 Qtcxx . . $ Qt/::ItemFlagscxx . . $ Qt/ItemFlags# QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::flagscxx . . $ QScriptDebuggerLocalsModel#flags(36b38c1b3d3f7b45).(const QModelIndexcxx . . $ QModelIndex# &index) const
907 {
908 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
909 if (!index.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
910 return {};
911 Qtcxx . . $ Qt/::ItemFlagscxx . . $ Qt/ItemFlags# ret = QAbstractItemModel::flags(index);
912 if ((index.columncxx . . $ QModelIndex#column(ea6fe5115c70a13f).() == 1) && index.parentcxx . . $ QModelIndex#parent(a394cbc57608ce34).().isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).()) {
913 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(index);
914 if (!(node->property.flags() & QScriptValuecxx . . $ QScriptValue#::ReadOnlycxx . . $ QScriptValue#ReadOnly.))
915 ret |= Qtcxx . . $ Qt/::ItemIsEditablecxx . . $ Qt/ItemIsEditable.;
916 }
917 return ret;
918 }
919
920 /*!
921 \reimp
922 */
923 bool QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::hasChildrencxx . . $ QScriptDebuggerLocalsModel#hasChildren(b4ec4506a4420b60).(const QModelIndexcxx . . $ QModelIndex# &parent) const
924 {
925 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
926 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(parent);
927 if (!node)
928 return false;
929 return !node->children.isEmpty()
930 || ((node->property.value().type() ==cxx . . $ `operator==`(844795bf13b447e6). QScriptDebuggerValuecxx . . $ QScriptDebuggerValue#::ObjectValuecxx . . $ QScriptDebuggerValue#ObjectValue.)
931 && (node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. == QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.));
932 }
933
934 /*!
935 \reimp
936 */
937 bool QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::canFetchMorecxx . . $ QScriptDebuggerLocalsModel#canFetchMore(b4ec4506a4420b60).(const QModelIndexcxx . . $ QModelIndex# &parent) const
938 {
939 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(const QScriptDebuggerLocalsModel);
940 if (!parent.isValidcxx . . $ QModelIndex#isValid(3482b152b9333168).())
941 return false;
942 QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode# *node = d->nodeFromIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#nodeFromIndex(571175d1e091f787).(parent);
943 return node
944 && (node->property.value().type() ==cxx . . $ `operator==`(844795bf13b447e6). QScriptDebuggerValuecxx . . $ QScriptDebuggerValue#::ObjectValuecxx . . $ QScriptDebuggerValue#ObjectValue.)
945 && (node->populationStatecxx . . $ QScriptDebuggerLocalsModelNode#populationState. == QScriptDebuggerLocalsModelNodecxx . . $ QScriptDebuggerLocalsModelNode#::NotPopulatedcxx . . $ QScriptDebuggerLocalsModelNode#NotPopulated.);
946 }
947
948 /*!
949 \reimp
950 */
951 void QScriptDebuggerLocalsModelcxx . . $ QScriptDebuggerLocalsModel#::fetchMorecxx . . $ QScriptDebuggerLocalsModel#fetchMore(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex# &parent)
952 {
953 Q_Dcxx . . $ `<external>/15045578679651060896/qglobal.h:1177:9`!(QScriptDebuggerLocalsModel);
954 d->populateIndexcxx . . $ QScriptDebuggerLocalsModelPrivate#populateIndex(87a6de385263c395).(parent);
955 }
956
957 QT_END_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:149:10`!