| 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 "qscriptdebuggercommandexecutor_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggercommandexecutor_p.h`/ |
| 41 | |
| 42 | #include "qscriptdebuggerbackend_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerbackend_p.h`/ |
| 43 | #include "qscriptdebuggercommand_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggercommand_p.h`/ |
| 44 | #include "qscriptdebuggerresponse_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerresponse_p.h`/ |
| 45 | #include "qscriptdebuggervalue_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggervalue_p.h`/ |
| 46 | #include "qscriptdebuggervalueproperty_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggervalueproperty_p.h`/ |
| 47 | #include "qscriptbreakpointdata_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptbreakpointdata_p.h`/ |
| 48 | #include "qscriptobjectsnapshot_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptobjectsnapshot_p.h`/ |
| 49 | #include "qscriptdebuggerobjectsnapshotdelta_p.h"cxx . . $ `<file>/src/scripttools/debugging/qscriptdebuggerobjectsnapshotdelta_p.h`/ |
| 50 | |
| 51 | #include <QtCore/qstringlist.h> |
| 52 | #include <QtScript/qscriptengine.h>cxx . . $ `<file>/include/QtScript/qscriptengine.h`/ |
| 53 | #include <QtScript/qscriptcontextinfo.h>cxx . . $ `<file>/include/QtScript/qscriptcontextinfo.h`/ |
| 54 | #include <QtScript/qscriptvalueiterator.h>cxx . . $ `<file>/include/QtScript/qscriptvalueiterator.h`/ |
| 55 | #include <QtCore/qdebug.h> |
| 56 | |
| 57 | #include <algorithm> |
| 58 | |
| 59 | Q_DECLARE_METATYPEcxx . . $ `<external>/17491093664533580526/qmetatype.h:2056:9`!(QScriptScriptsDelta) |
| 60 | Q_DECLARE_METATYPEcxx . . $ `<external>/17491093664533580526/qmetatype.h:2056:9`!(QScriptDebuggerValueProperty) |
| 61 | Q_DECLARE_METATYPEcxx . . $ `<external>/17491093664533580526/qmetatype.h:2056:9`!(QScriptDebuggerValuePropertyList) |
| 62 | Q_DECLARE_METATYPEcxx . . $ `<external>/17491093664533580526/qmetatype.h:2056:9`!(QScriptDebuggerObjectSnapshotDelta) |
| 63 | |
| 64 | QT_BEGIN_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:148:10`! |
| 65 | |
| 66 | /*! |
| 67 | \since 4.5 |
| 68 | \class QScriptDebuggerCommandExecutor |
| 69 | \internal |
| 70 | |
| 71 | \brief The QScriptDebuggerCommandExecutor applies debugger commands to a back-end. |
| 72 | |
| 73 | The execute() function takes a command (typically produced by a |
| 74 | QScriptDebuggerFrontend) and applies it to a QScriptDebuggerBackend. |
| 75 | |
| 76 | \sa QScriptDebuggerCommmand |
| 77 | */ |
| 78 | |
| 79 | class QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate# |
| 80 | { |
| 81 | public: |
| 82 | QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate#QScriptDebuggerCommandExecutorPrivate(49f6e7a06ebc5aa8).(); |
| 83 | ~cxx . . $ QScriptDebuggerCommandExecutorPrivate#`~QScriptDebuggerCommandExecutorPrivate`(ced63f7c635d850d).QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate#(); |
| 84 | }; |
| 85 | |
| 86 | QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate#::QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate#QScriptDebuggerCommandExecutorPrivate(49f6e7a06ebc5aa8).() |
| 87 | { |
| 88 | } |
| 89 | |
| 90 | QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate#::~cxx . . $ QScriptDebuggerCommandExecutorPrivate#`~QScriptDebuggerCommandExecutorPrivate`(ced63f7c635d850d).QScriptDebuggerCommandExecutorPrivatecxx . . $ QScriptDebuggerCommandExecutorPrivate#() |
| 91 | { |
| 92 | } |
| 93 | |
| 94 | QScriptDebuggerCommandExecutorcxx . . $ QScriptDebuggerCommandExecutor#::QScriptDebuggerCommandExecutorcxx . . $ QScriptDebuggerCommandExecutor#QScriptDebuggerCommandExecutor(49f6e7a06ebc5aa8).() |
| 95 | : d_ptr(new QScriptDebuggerCommandExecutorPrivate()) |
| 96 | { |
| 97 | } |
| 98 | |
| 99 | QScriptDebuggerCommandExecutorcxx . . $ QScriptDebuggerCommandExecutor#::~cxx . . $ QScriptDebuggerCommandExecutor#`~QScriptDebuggerCommandExecutor`(ced63f7c635d850d).QScriptDebuggerCommandExecutorcxx . . $ QScriptDebuggerCommandExecutor#() |
| 100 | { |
| 101 | } |
| 102 | |
| 103 | static bool isPrefixOfcxx . . $ isPrefixOf(edf9e4f73813982f).(const QStringcxx . . $ QString# &prefix, const QStringcxx . . $ QString# &what) |
| 104 | { |
| 105 | return ((what.lengthcxx . . $ QString#length(455f465bc33b4cdf).() > prefix.lengthcxx . . $ QString#length(455f465bc33b4cdf).()) |
| 106 | && what.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(prefix)); |
| 107 | } |
| 108 | |
| 109 | /*! |
| 110 | Applies the given \a command to the given \a backend. |
| 111 | */ |
| 112 | QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# QScriptDebuggerCommandExecutorcxx . . $ QScriptDebuggerCommandExecutor#::executecxx . . $ QScriptDebuggerCommandExecutor#execute(e2b292ab9abe841a).( |
| 113 | QScriptDebuggerBackendcxx . . $ QScriptDebuggerBackend# *backend, |
| 114 | const QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand# &command) |
| 115 | { |
| 116 | QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse# responsecxx . . $ QScriptDebuggerResponse#QScriptDebuggerResponse(49f6e7a06ebc5aa8).; |
| 117 | switch (command.typecxx . . $ QScriptDebuggerCommand#type(1eafd7c2c5609499).()) { |
| 118 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::Nonecxx . . $ QScriptDebuggerCommand#None.: |
| 119 | break; |
| 120 | |
| 121 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::Interruptcxx . . $ QScriptDebuggerCommand#Interrupt.: |
| 122 | backend->interruptEvaluationcxx . . $ QScriptDebuggerBackend#interruptEvaluation(49f6e7a06ebc5aa8).(); |
| 123 | break; |
| 124 | |
| 125 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::Continuecxx . . $ QScriptDebuggerCommand#Continue.: |
| 126 | if (backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).()->isEvaluatingcxx . . $ QScriptEngine#isEvaluating(50ce9a9e25b4a850).()) { |
| 127 | backend->continueEvalutioncxx . . $ QScriptDebuggerBackend#continueEvalution(49f6e7a06ebc5aa8).(); |
| 128 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 129 | } |
| 130 | break; |
| 131 | |
| 132 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::StepIntocxx . . $ QScriptDebuggerCommand#StepInto.: { |
| 133 | QVariantcxx . . $ QVariant# attr = command.attributecxx . . $ QScriptDebuggerCommand#attribute(661468959000a3f7).(QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::StepCountcxx . . $ QScriptDebuggerCommand#StepCount.); |
| 134 | int count = attr.isValidcxx . . $ QVariant#isValid(50ce9a9e25b4a850).() ? attr.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).() : 1; |
| 135 | backend->stepIntocxx . . $ QScriptDebuggerBackend#stepInto(d4f767463ce0a6b3).(count); |
| 136 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 137 | } break; |
| 138 | |
| 139 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::StepOvercxx . . $ QScriptDebuggerCommand#StepOver.: { |
| 140 | QVariantcxx . . $ QVariant# attr = command.attributecxx . . $ QScriptDebuggerCommand#attribute(661468959000a3f7).(QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::StepCountcxx . . $ QScriptDebuggerCommand#StepCount.); |
| 141 | int count = attr.isValidcxx . . $ QVariant#isValid(50ce9a9e25b4a850).() ? attr.toIntcxx . . $ QVariant#toInt(5bd9a3493f6a7a21).() : 1; |
| 142 | backend->stepOvercxx . . $ QScriptDebuggerBackend#stepOver(d4f767463ce0a6b3).(count); |
| 143 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 144 | } break; |
| 145 | |
| 146 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::StepOutcxx . . $ QScriptDebuggerCommand#StepOut.: |
| 147 | backend->stepOutcxx . . $ QScriptDebuggerBackend#stepOut(49f6e7a06ebc5aa8).(); |
| 148 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 149 | break; |
| 150 | |
| 151 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::RunToLocationcxx . . $ QScriptDebuggerCommand#RunToLocation.: |
| 152 | backend->runToLocationcxx . . $ QScriptDebuggerBackend#runToLocation(29ed8fcd127906b1).(command.fileNamecxx . . $ QScriptDebuggerCommand#fileName(6ef7b6c27b00b43d).(), command.lineNumbercxx . . $ QScriptDebuggerCommand#lineNumber(455f465bc33b4cdf).()); |
| 153 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 154 | break; |
| 155 | |
| 156 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::RunToLocationByIDcxx . . $ QScriptDebuggerCommand#RunToLocationByID.: |
| 157 | backend->runToLocationcxx . . $ QScriptDebuggerBackend#runToLocation(8ddcfaf041c5b3f7).(command.scriptIdcxx . . $ QScriptDebuggerCommand#scriptId(98833e9ab7de59a4).(), command.lineNumbercxx . . $ QScriptDebuggerCommand#lineNumber(455f465bc33b4cdf).()); |
| 158 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 159 | break; |
| 160 | |
| 161 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ForceReturncxx . . $ QScriptDebuggerCommand#ForceReturn.: { |
| 162 | int contextIndex = command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).(); |
| 163 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# value = command.scriptValuecxx . . $ QScriptDebuggerCommand#scriptValue(73c7f2fc16c9f19c).(); |
| 164 | QScriptEnginecxx . . $ QScriptEngine# *engine = backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).(); |
| 165 | QScriptValuecxx . . $ QScriptValue# realValue = value.toScriptValuecxx . . $ QScriptDebuggerValue#toScriptValue(2557638ff82b2654).(engine); |
| 166 | backend->returnToCallercxx . . $ QScriptDebuggerBackend#returnToCaller(f737cd1d5c46f864).(contextIndex, realValue); |
| 167 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 168 | } break; |
| 169 | |
| 170 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::Resumecxx . . $ QScriptDebuggerCommand#Resume.: |
| 171 | backend->resumecxx . . $ QScriptDebuggerBackend#resume(49f6e7a06ebc5aa8).(); |
| 172 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 173 | break; |
| 174 | |
| 175 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::SetBreakpointcxx . . $ QScriptDebuggerCommand#SetBreakpoint.: { |
| 176 | QScriptBreakpointDatacxx . . $ QScriptBreakpointData# data = command.breakpointDatacxx . . $ QScriptDebuggerCommand#breakpointData(b121f71baeac5753).(); |
| 177 | if (!data.isValidcxx . . $ QScriptBreakpointData#isValid(50ce9a9e25b4a850).()) |
| 178 | data =cxx . . $ QScriptBreakpointData#`operator=`(82ca2619bc72d34b). QScriptBreakpointDatacxx . . $ QScriptBreakpointData#QScriptBreakpointData(29ed8fcd127906b1).(command.fileNamecxx . . $ QScriptDebuggerCommand#fileName(6ef7b6c27b00b43d).(), command.lineNumbercxx . . $ QScriptDebuggerCommand#lineNumber(455f465bc33b4cdf).()); |
| 179 | int id = backend->setBreakpointcxx . . $ QScriptDebuggerBackend#setBreakpoint(6eecdf9662318ec1).(data); |
| 180 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(d4f767463ce0a6b3).(id); |
| 181 | } break; |
| 182 | |
| 183 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::DeleteBreakpointcxx . . $ QScriptDebuggerCommand#DeleteBreakpoint.: { |
| 184 | int id = command.breakpointIdcxx . . $ QScriptDebuggerCommand#breakpointId(455f465bc33b4cdf).(); |
| 185 | if (!backend->deleteBreakpointcxx . . $ QScriptDebuggerBackend#deleteBreakpoint(83c267b20bac841a).(id)) |
| 186 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidBreakpointIDcxx . . $ QScriptDebuggerResponse#InvalidBreakpointID.); |
| 187 | } break; |
| 188 | |
| 189 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::DeleteAllBreakpointscxx . . $ QScriptDebuggerCommand#DeleteAllBreakpoints.: |
| 190 | backend->deleteAllBreakpointscxx . . $ QScriptDebuggerBackend#deleteAllBreakpoints(49f6e7a06ebc5aa8).(); |
| 191 | break; |
| 192 | |
| 193 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetBreakpointscxx . . $ QScriptDebuggerCommand#GetBreakpoints.: { |
| 194 | QScriptBreakpointMapcxx . . $ QScriptBreakpointMap# bps = backend->breakpoints(); |
| 195 | if (!bps.isEmpty()) |
| 196 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(bps); |
| 197 | } break; |
| 198 | |
| 199 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetBreakpointDatacxx . . $ QScriptDebuggerCommand#GetBreakpointData.: { |
| 200 | int id = command.breakpointIdcxx . . $ QScriptDebuggerCommand#breakpointId(455f465bc33b4cdf).(); |
| 201 | QScriptBreakpointDatacxx . . $ QScriptBreakpointData# data = backend->breakpointDatacxx . . $ QScriptDebuggerBackend#breakpointData(f47377ac0cc278c1).(id); |
| 202 | if (data.isValidcxx . . $ QScriptBreakpointData#isValid(50ce9a9e25b4a850).()) |
| 203 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(694486080f38713d).(data); |
| 204 | else |
| 205 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidBreakpointIDcxx . . $ QScriptDebuggerResponse#InvalidBreakpointID.); |
| 206 | } break; |
| 207 | |
| 208 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::SetBreakpointDatacxx . . $ QScriptDebuggerCommand#SetBreakpointData.: { |
| 209 | int id = command.breakpointIdcxx . . $ QScriptDebuggerCommand#breakpointId(455f465bc33b4cdf).(); |
| 210 | QScriptBreakpointDatacxx . . $ QScriptBreakpointData# data = command.breakpointDatacxx . . $ QScriptDebuggerCommand#breakpointData(b121f71baeac5753).(); |
| 211 | if (!backend->setBreakpointDatacxx . . $ QScriptDebuggerBackend#setBreakpointData(d8a67169e1e3d7d7).(id, data)) |
| 212 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidBreakpointIDcxx . . $ QScriptDebuggerResponse#InvalidBreakpointID.); |
| 213 | } break; |
| 214 | |
| 215 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetScriptscxx . . $ QScriptDebuggerCommand#GetScripts.: { |
| 216 | QScriptScriptMapcxx . . $ QScriptScriptMap# scripts = backend->scripts(); |
| 217 | if (!scripts.isEmpty()) |
| 218 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(scripts); |
| 219 | } break; |
| 220 | |
| 221 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetScriptDatacxx . . $ QScriptDebuggerCommand#GetScriptData.: { |
| 222 | qint64cxx . . $ qint64# id = command.scriptIdcxx . . $ QScriptDebuggerCommand#scriptId(98833e9ab7de59a4).(); |
| 223 | QScriptScriptDatacxx . . $ QScriptScriptData# data = backend->scriptDatacxx . . $ QScriptDebuggerBackend#scriptData(5fe4cebf2789381f).(id); |
| 224 | if (data.isValidcxx . . $ QScriptScriptData#isValid(50ce9a9e25b4a850).()) |
| 225 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(b7643124fad3496c).(data); |
| 226 | else |
| 227 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidScriptIDcxx . . $ QScriptDebuggerResponse#InvalidScriptID.); |
| 228 | } break; |
| 229 | |
| 230 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ScriptsCheckpointcxx . . $ QScriptDebuggerCommand#ScriptsCheckpoint.: |
| 231 | backend->scriptsCheckpointcxx . . $ QScriptDebuggerBackend#scriptsCheckpoint(49f6e7a06ebc5aa8).(); |
| 232 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(244511558b20107a).(QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(28ec88ac519b76da).(backend->scriptsDeltacxx . . $ QScriptDebuggerBackend#scriptsDelta(cb124f88b85b42c7).())); |
| 233 | break; |
| 234 | |
| 235 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetScriptsDeltacxx . . $ QScriptDebuggerCommand#GetScriptsDelta.: |
| 236 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(244511558b20107a).(QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(28ec88ac519b76da).(backend->scriptsDeltacxx . . $ QScriptDebuggerBackend#scriptsDelta(cb124f88b85b42c7).())); |
| 237 | break; |
| 238 | |
| 239 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ResolveScriptcxx . . $ QScriptDebuggerCommand#ResolveScript.: |
| 240 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(d4f767463ce0a6b3).(backend->resolveScriptcxx . . $ QScriptDebuggerBackend#resolveScript(c5ada2df72ae1405).(command.fileNamecxx . . $ QScriptDebuggerCommand#fileName(6ef7b6c27b00b43d).())); |
| 241 | break; |
| 242 | |
| 243 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetBacktracecxx . . $ QScriptDebuggerCommand#GetBacktrace.: |
| 244 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(244511558b20107a).(backend->backtracecxx . . $ QScriptDebuggerBackend#backtrace(e1dbd5c4feadc8f5).()); |
| 245 | break; |
| 246 | |
| 247 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetContextCountcxx . . $ QScriptDebuggerCommand#GetContextCount.: |
| 248 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(d4f767463ce0a6b3).(backend->contextCountcxx . . $ QScriptDebuggerBackend#contextCount(455f465bc33b4cdf).()); |
| 249 | break; |
| 250 | |
| 251 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetContextStatecxx . . $ QScriptDebuggerCommand#GetContextState.: { |
| 252 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 253 | if (ctx) |
| 254 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(d4f767463ce0a6b3).(static_cast<int>(ctx->statecxx . . $ QScriptContext#state(d85ffd99b7d34284).())); |
| 255 | else |
| 256 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidContextIndexcxx . . $ QScriptDebuggerResponse#InvalidContextIndex.); |
| 257 | } break; |
| 258 | |
| 259 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetContextIDcxx . . $ QScriptDebuggerCommand#GetContextID.: { |
| 260 | int idx = command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).(); |
| 261 | if ((idx >= 0) && (idx < backend->contextCountcxx . . $ QScriptDebuggerBackend#contextCount(455f465bc33b4cdf).())) |
| 262 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(backend->contextIds()[idx]); |
| 263 | else |
| 264 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidContextIndexcxx . . $ QScriptDebuggerResponse#InvalidContextIndex.); |
| 265 | } break; |
| 266 | |
| 267 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetContextInfocxx . . $ QScriptDebuggerCommand#GetContextInfo.: { |
| 268 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 269 | if (ctx) |
| 270 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(15f9233a4d5251fb).(QScriptContextInfocxx . . $ QScriptContextInfo#QScriptContextInfo(2a79a5bde8f9d42e).(ctx)); |
| 271 | else |
| 272 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidContextIndexcxx . . $ QScriptDebuggerResponse#InvalidContextIndex.); |
| 273 | } break; |
| 274 | |
| 275 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetThisObjectcxx . . $ QScriptDebuggerCommand#GetThisObject.: { |
| 276 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 277 | if (ctx) |
| 278 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(ctx->thisObjectcxx . . $ QScriptContext#thisObject(73013aefd0020d47).()); |
| 279 | else |
| 280 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidContextIndexcxx . . $ QScriptDebuggerResponse#InvalidContextIndex.); |
| 281 | } break; |
| 282 | |
| 283 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetActivationObjectcxx . . $ QScriptDebuggerCommand#GetActivationObject.: { |
| 284 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 285 | if (ctx) |
| 286 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(ctx->activationObjectcxx . . $ QScriptContext#activationObject(73013aefd0020d47).()); |
| 287 | else |
| 288 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidContextIndexcxx . . $ QScriptDebuggerResponse#InvalidContextIndex.); |
| 289 | } break; |
| 290 | |
| 291 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetScopeChaincxx . . $ QScriptDebuggerCommand#GetScopeChain.: { |
| 292 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 293 | if (ctx) { |
| 294 | QScriptDebuggerValueListcxx . . $ QScriptDebuggerValueList# dest; |
| 295 | QScriptValueListcxx . . $ QScriptValueList# src = ctx->scopeChain(); |
| 296 | for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). src.size(); ++i) |
| 297 | dest.append(src.at(i)); |
| 298 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(dest); |
| 299 | } else { |
| 300 | response.setErrorcxx . . $ QScriptDebuggerResponse#setError(d19ba9a6ddee3d8).(QScriptDebuggerResponsecxx . . $ QScriptDebuggerResponse#::InvalidContextIndexcxx . . $ QScriptDebuggerResponse#InvalidContextIndex.); |
| 301 | } |
| 302 | } break; |
| 303 | |
| 304 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ContextsCheckpointcxx . . $ QScriptDebuggerCommand#ContextsCheckpoint.: { |
| 305 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(244511558b20107a).(QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(28ec88ac519b76da).(backend->contextsCheckpointcxx . . $ QScriptDebuggerBackend#contextsCheckpoint(158007b70cd6762a).())); |
| 306 | } break; |
| 307 | |
| 308 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetPropertyExpressionValuecxx . . $ QScriptDebuggerCommand#GetPropertyExpressionValue.: { |
| 309 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 310 | int lineNumber = command.lineNumbercxx . . $ QScriptDebuggerCommand#lineNumber(455f465bc33b4cdf).(); |
| 311 | QVariantcxx . . $ QVariant# attr = command.attributecxx . . $ QScriptDebuggerCommand#attribute(661468959000a3f7).(QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::UserAttributecxx . . $ QScriptDebuggerCommand#UserAttribute.); |
| 312 | QStringListcxx . . $ QStringList# path = attr.toStringListcxx . . $ QVariant#toStringList(e1dbd5c4feadc8f5).(); |
| 313 | if (!ctx || path.isEmpty()) |
| 314 | break; |
| 315 | QScriptContextInfocxx . . $ QScriptContextInfo# ctxInfocxx . . $ QScriptContextInfo#QScriptContextInfo(2a79a5bde8f9d42e).(ctx); |
| 316 | if (ctx->calleecxx . . $ QScriptContext#callee(73013aefd0020d47).().isValidcxx . . $ QScriptValue#isValid(50ce9a9e25b4a850).() |
| 317 | && ((lineNumber < ctxInfo.functionStartLineNumbercxx . . $ QScriptContextInfo#functionStartLineNumber(455f465bc33b4cdf).()) |
| 318 | || (lineNumber > ctxInfo.functionEndLineNumbercxx . . $ QScriptContextInfo#functionEndLineNumber(455f465bc33b4cdf).()))) { |
| 319 | break; |
| 320 | } |
| 321 | QScriptValueListcxx . . $ QScriptValueList# objects; |
| 322 | int pathIndex = 0; |
| 323 | if (path.at(0) ==cxx . . $ `operator==`(c658459fbfebdd4a). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("this")) { |
| 324 | objects.append(ctx->thisObjectcxx . . $ QScriptContext#thisObject(73013aefd0020d47).()); |
| 325 | ++pathIndex; |
| 326 | } else { |
| 327 | objects <<cxx . . $ `operator<<`(f31fa7a00558f994). ctx->scopeChaincxx . . $ QScriptContext#scopeChain(ca7380bea0cabe02).(); |
| 328 | } |
| 329 | for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). objects.size(); ++i) { |
| 330 | QScriptValuecxx . . $ QScriptValue# val = objects.at(i); |
| 331 | for (int j = pathIndex; val.isValidcxx . . $ QScriptValue#isValid(50ce9a9e25b4a850).() && (j <cxx . . $ `operator<`(9d1caf642710d3b0). path.size()); ++j) { |
| 332 | val = val.propertycxx . . $ QScriptValue#property(84c547af90749cd4).(path.at(j)); |
| 333 | } |
| 334 | if (val.isValidcxx . . $ QScriptValue#isValid(50ce9a9e25b4a850).()) { |
| 335 | bool hadException = (ctx->statecxx . . $ QScriptContext#state(d85ffd99b7d34284).() == QScriptContextcxx . . $ QScriptContext#::ExceptionStatecxx . . $ QScriptContext#ExceptionState.); |
| 336 | QStringcxx . . $ QString# str = val.toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).(); |
| 337 | if (!hadException && backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).()->hasUncaughtExceptioncxx . . $ QScriptEngine#hasUncaughtException(50ce9a9e25b4a850).()) |
| 338 | backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).()->clearExceptionscxx . . $ QScriptEngine#clearExceptions(49f6e7a06ebc5aa8).(); |
| 339 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(3520e46b33348bf6).(str); |
| 340 | break; |
| 341 | } |
| 342 | } |
| 343 | } break; |
| 344 | |
| 345 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetCompletionscxx . . $ QScriptDebuggerCommand#GetCompletions.: { |
| 346 | QScriptContextcxx . . $ QScriptContext# *ctx = backend->contextcxx . . $ QScriptDebuggerBackend#context(a9726aae27ee23bc).(command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).()); |
| 347 | QVariantcxx . . $ QVariant# attr = command.attributecxx . . $ QScriptDebuggerCommand#attribute(661468959000a3f7).(QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::UserAttributecxx . . $ QScriptDebuggerCommand#UserAttribute.); |
| 348 | QStringListcxx . . $ QStringList# path = attr.toStringListcxx . . $ QVariant#toStringList(e1dbd5c4feadc8f5).(); |
| 349 | if (!ctx || path.isEmpty()) |
| 350 | break; |
| 351 | QScriptValueListcxx . . $ QScriptValueList# objects; |
| 352 | QStringcxx . . $ QString# prefix = path.last(); |
| 353 | QSetcxx . . $ QSet#<QStringcxx . . $ QString#> matches; |
| 354 | if (path.size() >cxx . . $ `operator>`(489f5a20d57ffae2). 1) { |
| 355 | const QStringcxx . . $ QString# &topLevelIdent = path.at(0); |
| 356 | QScriptValuecxx . . $ QScriptValue# objcxx . . $ QScriptValue#QScriptValue(49f6e7a06ebc5aa8).; |
| 357 | if (topLevelIdent ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("this")) { |
| 358 | obj =cxx . . $ QScriptValue#`operator=`(1a503f9e5bba28ab). ctx->thisObjectcxx . . $ QScriptContext#thisObject(73013aefd0020d47).(); |
| 359 | } else { |
| 360 | QScriptValueListcxx . . $ QScriptValueList# scopeChain; |
| 361 | scopeChain = ctx->scopeChaincxx . . $ QScriptContext#scopeChain(ca7380bea0cabe02).(); |
| 362 | for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). scopeChain.size(); ++i) { |
| 363 | QScriptValuecxx . . $ QScriptValue# oo = scopeChain.at(i).property(topLevelIdent); |
| 364 | if (oo.isObjectcxx . . $ QScriptValue#isObject(50ce9a9e25b4a850).()) { |
| 365 | obj =cxx . . $ QScriptValue#`operator=`(1a503f9e5bba28ab). oo; |
| 366 | break; |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | for (int i = 1; obj.isObjectcxx . . $ QScriptValue#isObject(50ce9a9e25b4a850).() && (i <cxx . . $ `operator<`(9d1caf642710d3b0). path.size()-cxx . . $ operator-(bea4db219b453aae).1); ++i) |
| 371 | obj = obj.propertycxx . . $ QScriptValue#property(84c547af90749cd4).(path.at(i)); |
| 372 | if (obj.isValidcxx . . $ QScriptValue#isValid(50ce9a9e25b4a850).()) |
| 373 | objects.append(obj); |
| 374 | } else { |
| 375 | objects <<cxx . . $ `operator<<`(f31fa7a00558f994). ctx->scopeChaincxx . . $ QScriptContext#scopeChain(ca7380bea0cabe02).(); |
| 376 | QStringListcxx . . $ QStringList# keywordscxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 377 | keywords.append(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("this")); |
| 378 | keywords.append(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("true")); |
| 379 | keywords.append(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("false")); |
| 380 | keywords.append(QStringcxx . . $ QString#::fromLatin1cxx . . $ QString#fromLatin1(5ac70cc0fa2a874e).("null")); |
| 381 | for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). keywords.size(); ++i) { |
| 382 | const QStringcxx . . $ QString# &kwd = keywords.at(i); |
| 383 | if (isPrefixOfcxx . . $ isPrefixOf(edf9e4f73813982f).(prefix, kwd)) |
| 384 | matches.insert(kwd); |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). objects.size(); ++i) { |
| 389 | QScriptValuecxx . . $ QScriptValue# obj = objects.at(i); |
| 390 | while (obj.isObjectcxx . . $ QScriptValue#isObject(50ce9a9e25b4a850).()) { |
| 391 | QScriptValueIteratorcxx . . $ QScriptValueIterator# itcxx . . $ QScriptValueIterator#QScriptValueIterator(6b35c8bde2804237).(obj); |
| 392 | while (it.hasNextcxx . . $ QScriptValueIterator#hasNext(50ce9a9e25b4a850).()) { |
| 393 | it.nextcxx . . $ QScriptValueIterator#next(49f6e7a06ebc5aa8).(); |
| 394 | QStringcxx . . $ QString# propertyName = it.namecxx . . $ QScriptValueIterator#name(6ef7b6c27b00b43d).(); |
| 395 | if (isPrefixOfcxx . . $ isPrefixOf(edf9e4f73813982f).(prefix, propertyName)) |
| 396 | matches.insert(propertyName); |
| 397 | } |
| 398 | obj =cxx . . $ QScriptValue#`operator=`(1a503f9e5bba28ab). obj.prototypecxx . . $ QScriptValue#prototype(73013aefd0020d47).(); |
| 399 | } |
| 400 | } |
| 401 | QStringListcxx . . $ QStringList# matchesList = matches.toList(); |
| 402 | stdcxx . . $ std/::stable_sortcxx . . $ std/stable_sort(249673c20e2b8d5).(matchesList.begin(), matchesList.end()); |
| 403 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(244511558b20107a).(matchesList); |
| 404 | } break; |
| 405 | |
| 406 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::NewScriptObjectSnapshotcxx . . $ QScriptDebuggerCommand#NewScriptObjectSnapshot.: { |
| 407 | int id = backend->newScriptObjectSnapshotcxx . . $ QScriptDebuggerBackend#newScriptObjectSnapshot(b126dc7c1de90089).(); |
| 408 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(d4f767463ce0a6b3).(id); |
| 409 | } break; |
| 410 | |
| 411 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ScriptObjectSnapshotCapturecxx . . $ QScriptDebuggerCommand#ScriptObjectSnapshotCapture.: { |
| 412 | int id = command.snapshotIdcxx . . $ QScriptDebuggerCommand#snapshotId(455f465bc33b4cdf).(); |
| 413 | QScriptObjectSnapshotcxx . . $ QScriptObjectSnapshot# *snap = backend->scriptObjectSnapshotcxx . . $ QScriptDebuggerBackend#scriptObjectSnapshot(7aa65301213b06d7).(id); |
| 414 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(snap != 0); |
| 415 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# object = command.scriptValuecxx . . $ QScriptDebuggerCommand#scriptValue(73c7f2fc16c9f19c).(); |
| 416 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(object.type() == QScriptDebuggerValue::ObjectValue); |
| 417 | QScriptEnginecxx . . $ QScriptEngine# *engine = backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).(); |
| 418 | QScriptValuecxx . . $ QScriptValue# realObject = object.toScriptValuecxx . . $ QScriptDebuggerValue#toScriptValue(2557638ff82b2654).(engine); |
| 419 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(realObject.isObject()); |
| 420 | QScriptObjectSnapshotcxx . . $ QScriptObjectSnapshot#::Deltacxx . . $ QScriptObjectSnapshot#Delta# delta = snap->capturecxx . . $ QScriptObjectSnapshot#capture(a4cf1dcc18433a51).(realObject); |
| 421 | QScriptDebuggerObjectSnapshotDeltacxx . . $ QScriptDebuggerObjectSnapshotDelta# result; |
| 422 | result.removedProperties = delta.removedProperties; |
| 423 | bool didIgnoreExceptions = backend->ignoreExceptionscxx . . $ QScriptDebuggerBackend#ignoreExceptions(50ce9a9e25b4a850).(); |
| 424 | backend->setIgnoreExceptionscxx . . $ QScriptDebuggerBackend#setIgnoreExceptions(b45ddcbc8423892c).(true); |
| 425 | for (int i = 0; i <cxx . . $ `operator<`(9d1caf642710d3b0). delta.changedProperties.size(); ++i) { |
| 426 | const QScriptValuePropertycxx . . $ QScriptValueProperty# &src = delta.changedProperties.at(i); |
| 427 | bool hadException = engine->hasUncaughtExceptioncxx . . $ QScriptEngine#hasUncaughtException(50ce9a9e25b4a850).(); |
| 428 | QStringcxx . . $ QString# str = src.valuecxx . . $ QScriptValueProperty#value(73013aefd0020d47).().toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).(); |
| 429 | if (!hadException && engine->hasUncaughtExceptioncxx . . $ QScriptEngine#hasUncaughtException(50ce9a9e25b4a850).()) |
| 430 | engine->clearExceptionscxx . . $ QScriptEngine#clearExceptions(49f6e7a06ebc5aa8).(); |
| 431 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# dest(src.namecxx . . $ QScriptValueProperty#name(6ef7b6c27b00b43d).(), src.valuecxx . . $ QScriptValueProperty#value(73013aefd0020d47).(), str, src.flagscxx . . $ QScriptValueProperty#flags(97d37d1154f9e612).()); |
| 432 | result.changedProperties.append(dest); |
| 433 | } |
| 434 | for (int j = 0; j <cxx . . $ `operator<`(9d1caf642710d3b0). delta.addedProperties.size(); ++j) { |
| 435 | const QScriptValuePropertycxx . . $ QScriptValueProperty# &src = delta.addedProperties.at(j); |
| 436 | bool hadException = engine->hasUncaughtExceptioncxx . . $ QScriptEngine#hasUncaughtException(50ce9a9e25b4a850).(); |
| 437 | QStringcxx . . $ QString# str = src.valuecxx . . $ QScriptValueProperty#value(73013aefd0020d47).().toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).(); |
| 438 | if (!hadException && engine->hasUncaughtExceptioncxx . . $ QScriptEngine#hasUncaughtException(50ce9a9e25b4a850).()) |
| 439 | engine->clearExceptionscxx . . $ QScriptEngine#clearExceptions(49f6e7a06ebc5aa8).(); |
| 440 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# dest(src.namecxx . . $ QScriptValueProperty#name(6ef7b6c27b00b43d).(), src.valuecxx . . $ QScriptValueProperty#value(73013aefd0020d47).(), str, src.flagscxx . . $ QScriptValueProperty#flags(97d37d1154f9e612).()); |
| 441 | result.addedProperties.append(dest); |
| 442 | } |
| 443 | backend->setIgnoreExceptionscxx . . $ QScriptDebuggerBackend#setIgnoreExceptions(b45ddcbc8423892c).(didIgnoreExceptions); |
| 444 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(244511558b20107a).(QVariantcxx . . $ QVariant#::fromValuecxx . . $ QVariant#fromValue(28ec88ac519b76da).(result)); |
| 445 | } break; |
| 446 | |
| 447 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::DeleteScriptObjectSnapshotcxx . . $ QScriptDebuggerCommand#DeleteScriptObjectSnapshot.: { |
| 448 | int id = command.snapshotIdcxx . . $ QScriptDebuggerCommand#snapshotId(455f465bc33b4cdf).(); |
| 449 | backend->deleteScriptObjectSnapshotcxx . . $ QScriptDebuggerBackend#deleteScriptObjectSnapshot(d4f767463ce0a6b3).(id); |
| 450 | } break; |
| 451 | |
| 452 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::NewScriptValueIteratorcxx . . $ QScriptDebuggerCommand#NewScriptValueIterator.: { |
| 453 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# object = command.scriptValuecxx . . $ QScriptDebuggerCommand#scriptValue(73c7f2fc16c9f19c).(); |
| 454 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(object.type() == QScriptDebuggerValue::ObjectValue); |
| 455 | QScriptEnginecxx . . $ QScriptEngine# *engine = backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).(); |
| 456 | QScriptValuecxx . . $ QScriptValue# realObject = object.toScriptValuecxx . . $ QScriptDebuggerValue#toScriptValue(2557638ff82b2654).(engine); |
| 457 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(realObject.isObject()); |
| 458 | int id = backend->newScriptValueIteratorcxx . . $ QScriptDebuggerBackend#newScriptValueIterator(1ba93f8a114f47f4).(realObject); |
| 459 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(d4f767463ce0a6b3).(id); |
| 460 | } break; |
| 461 | |
| 462 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::GetPropertiesByIteratorcxx . . $ QScriptDebuggerCommand#GetPropertiesByIterator.: { |
| 463 | int id = command.iteratorIdcxx . . $ QScriptDebuggerCommand#iteratorId(455f465bc33b4cdf).(); |
| 464 | int count = 1000; |
| 465 | QScriptValueIteratorcxx . . $ QScriptValueIterator# *it = backend->scriptValueIteratorcxx . . $ QScriptDebuggerBackend#scriptValueIterator(49a675f29d5d8bc0).(id); |
| 466 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!(it != 0); |
| 467 | QScriptDebuggerValuePropertyListcxx . . $ QScriptDebuggerValuePropertyList# props; |
| 468 | for (int i = 0; (i < count) && it->hasNextcxx . . $ QScriptValueIterator#hasNext(50ce9a9e25b4a850).(); ++i) { |
| 469 | it->nextcxx . . $ QScriptValueIterator#next(49f6e7a06ebc5aa8).(); |
| 470 | QStringcxx . . $ QString# name = it->namecxx . . $ QScriptValueIterator#name(6ef7b6c27b00b43d).(); |
| 471 | QScriptValuecxx . . $ QScriptValue# value = it->valuecxx . . $ QScriptValueIterator#value(73013aefd0020d47).(); |
| 472 | QStringcxx . . $ QString# valueAsString = value.toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).(); |
| 473 | QScriptValuecxx . . $ QScriptValue#::PropertyFlagscxx . . $ QScriptValue#PropertyFlags# flags = it->flags(); |
| 474 | QScriptDebuggerValuePropertycxx . . $ QScriptDebuggerValueProperty# prp(name, value, valueAsString, flags); |
| 475 | props.append(prp); |
| 476 | } |
| 477 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(98e9fe25954e1086).(props); |
| 478 | } break; |
| 479 | |
| 480 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::DeleteScriptValueIteratorcxx . . $ QScriptDebuggerCommand#DeleteScriptValueIterator.: { |
| 481 | int id = command.iteratorIdcxx . . $ QScriptDebuggerCommand#iteratorId(455f465bc33b4cdf).(); |
| 482 | backend->deleteScriptValueIteratorcxx . . $ QScriptDebuggerBackend#deleteScriptValueIterator(d4f767463ce0a6b3).(id); |
| 483 | } break; |
| 484 | |
| 485 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::Evaluatecxx . . $ QScriptDebuggerCommand#Evaluate.: { |
| 486 | int contextIndex = command.contextIndexcxx . . $ QScriptDebuggerCommand#contextIndex(455f465bc33b4cdf).(); |
| 487 | QStringcxx . . $ QString# program = command.programcxx . . $ QScriptDebuggerCommand#program(6ef7b6c27b00b43d).(); |
| 488 | QStringcxx . . $ QString# fileName = command.fileNamecxx . . $ QScriptDebuggerCommand#fileName(6ef7b6c27b00b43d).(); |
| 489 | int lineNumber = command.lineNumbercxx . . $ QScriptDebuggerCommand#lineNumber(455f465bc33b4cdf).(); |
| 490 | backend->evaluatecxx . . $ QScriptDebuggerBackend#evaluate(4ef4587293ce52f8).(contextIndex, program, fileName, lineNumber); |
| 491 | response.setAsynccxx . . $ QScriptDebuggerResponse#setAsync(b45ddcbc8423892c).(true); |
| 492 | } break; |
| 493 | |
| 494 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ScriptValueToStringcxx . . $ QScriptDebuggerCommand#ScriptValueToString.: { |
| 495 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# value = command.scriptValuecxx . . $ QScriptDebuggerCommand#scriptValue(73c7f2fc16c9f19c).(); |
| 496 | QScriptEnginecxx . . $ QScriptEngine# *engine = backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).(); |
| 497 | QScriptValuecxx . . $ QScriptValue# realValue = value.toScriptValuecxx . . $ QScriptDebuggerValue#toScriptValue(2557638ff82b2654).(engine); |
| 498 | response.setResultcxx . . $ QScriptDebuggerResponse#setResult(3520e46b33348bf6).(realValue.toStringcxx . . $ QScriptValue#toString(6ef7b6c27b00b43d).()); |
| 499 | } break; |
| 500 | |
| 501 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::SetScriptValuePropertycxx . . $ QScriptDebuggerCommand#SetScriptValueProperty.: { |
| 502 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# object = command.scriptValuecxx . . $ QScriptDebuggerCommand#scriptValue(73c7f2fc16c9f19c).(); |
| 503 | QScriptEnginecxx . . $ QScriptEngine# *engine = backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).(); |
| 504 | QScriptValuecxx . . $ QScriptValue# realObject = object.toScriptValuecxx . . $ QScriptDebuggerValue#toScriptValue(2557638ff82b2654).(engine); |
| 505 | QScriptDebuggerValuecxx . . $ QScriptDebuggerValue# value = command.subordinateScriptValuecxx . . $ QScriptDebuggerCommand#subordinateScriptValue(73c7f2fc16c9f19c).(); |
| 506 | QScriptValuecxx . . $ QScriptValue# realValue = value.toScriptValuecxx . . $ QScriptDebuggerValue#toScriptValue(2557638ff82b2654).(engine); |
| 507 | QStringcxx . . $ QString# name = command.namecxx . . $ QScriptDebuggerCommand#name(6ef7b6c27b00b43d).(); |
| 508 | realObject.setPropertycxx . . $ QScriptValue#setProperty(e166b3a4cfa646).(name, realValue); |
| 509 | } break; |
| 510 | |
| 511 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::ClearExceptionscxx . . $ QScriptDebuggerCommand#ClearExceptions.: |
| 512 | backend->enginecxx . . $ QScriptDebuggerBackend#engine(18bf45d2c163ce9b).()->clearExceptionscxx . . $ QScriptEngine#clearExceptions(49f6e7a06ebc5aa8).(); |
| 513 | break; |
| 514 | |
| 515 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::UserCommandcxx . . $ QScriptDebuggerCommand#UserCommand.: |
| 516 | case QScriptDebuggerCommandcxx . . $ QScriptDebuggerCommand#::MaxUserCommandcxx . . $ QScriptDebuggerCommand#MaxUserCommand.: |
| 517 | break; |
| 518 | } |
| 519 | return responsecxx . . $ QScriptDebuggerResponse#QScriptDebuggerResponse(541273ffa781cadc).; |
| 520 | } |
| 521 | |
| 522 | QT_END_NAMESPACEcxx . . $ `<external>/15045578679651060896/qglobal.h:149:10`! |