diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-11-07 14:18:21 +0100 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-11-07 14:34:06 +0100 |
commit | 9b86824818ef6ca03aa6dbdbab1ef54e0efc6923 (patch) | |
tree | cf4f1101439776ae2289f07febb85365cd230fe9 | |
parent | bf0e6ee567147bdf3bee8c2573509a4140b7dbcb (diff) | |
download | qt-creator-9b86824818ef6ca03aa6dbdbab1ef54e0efc6923.tar.gz |
Remove unused code from the QML debugger client.
Change-Id: I286c690e4e54c766ae4d345add3f78e867863005
Reviewed-by: hjk <hjk121@nokiamail.com>
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclient.cpp | 120 | ||||
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclient.h | 2 | ||||
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclientconstants.h | 3 |
3 files changed, 0 insertions, 125 deletions
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp index fbfb6a9abc..6b3747ef59 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp @@ -107,12 +107,9 @@ public: const QString condition = QString(), int ignoreCount = -1); void clearBreakpoint(int breakpoint); void setExceptionBreak(QmlV8DebuggerClient::Exceptions type, bool enabled = false); - void listBreakpoints(); - void v8flags(const QString flags); void version(); //void profile(ProfileCommand command); //NOT SUPPORTED - void gc(); void clearCache(); void logSendMessage(const QString &msg) const; @@ -654,44 +651,6 @@ void QmlV8DebuggerClientPrivate::setExceptionBreak(QmlV8DebuggerClient::Exceptio q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8())); } -void QmlV8DebuggerClientPrivate::listBreakpoints() -{ - // { "seq" : <number>, - // "type" : "request", - // "command" : "listbreakpoints", - // } - QScriptValue jsonVal = initObject(); - jsonVal.setProperty(_(COMMAND), - QScriptValue(_(LISTBREAKPOINTS))); - - const QScriptValue jsonMessage = stringifier.call(QScriptValue(), QScriptValueList() << jsonVal); - logSendMessage(QString(_("%1 %2 %3")).arg(_(V8DEBUG), _(V8REQUEST), jsonMessage.toString())); - q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8())); -} - -void QmlV8DebuggerClientPrivate::v8flags(const QString flags) -{ - // { "seq" : <number>, - // "type" : "request", - // "command" : "v8flags", - // "arguments" : { "flags" : <string: a sequence of v8 flags just like - // those used on the command line> - // } - // } - QScriptValue jsonVal = initObject(); - jsonVal.setProperty(_(COMMAND), QScriptValue(_(V8FLAGS))); - - QScriptValue args = parser.call(QScriptValue(), QScriptValueList() << QScriptValue(_(OBJECT))); - - args.setProperty(_(FLAGS), QScriptValue(flags)); - - jsonVal.setProperty(_(ARGUMENTS), args); - - const QScriptValue jsonMessage = stringifier.call(QScriptValue(), QScriptValueList() << jsonVal); - logSendMessage(QString(_("%1 %2 %3")).arg(_(V8DEBUG), _(V8REQUEST), jsonMessage.toString())); - q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8())); -} - void QmlV8DebuggerClientPrivate::version() { // { "seq" : <number>, @@ -731,29 +690,6 @@ void QmlV8DebuggerClientPrivate::version() // q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8())); //} -void QmlV8DebuggerClientPrivate::gc() -{ - // { "seq" : <number>, - // "type" : "request", - // "command" : "gc", - // "arguments" : { "type" : <string: "all">, - // } - // } - QScriptValue jsonVal = initObject(); - jsonVal.setProperty(_(COMMAND), - QScriptValue(_(GARBAGECOLLECTOR))); - - QScriptValue args = parser.call(QScriptValue(), QScriptValueList() << QScriptValue(_(OBJECT))); - - args.setProperty(_(TYPE), QScriptValue(_(ALL))); - - jsonVal.setProperty(_(ARGUMENTS), args); - - const QScriptValue jsonMessage = stringifier.call(QScriptValue(), QScriptValueList() << jsonVal); - logSendMessage(QString(_("%1 %2 %3")).arg(_(V8DEBUG), _(V8REQUEST), jsonMessage.toString())); - q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8())); -} - QVariant valueFromRef(int handle, const QVariant &refsVal, bool *success) { *success = false; @@ -1224,10 +1160,6 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data) updateEvaluationResult(seq, success, QVariant(map), QVariant()); } - } else if (debugCommand == _(LISTBREAKPOINTS)) { - if (success) - updateBreakpoints(resp.value(_(BODY))); - } else if (debugCommand == _(SETBREAKPOINT)) { // { "seq" : <number>, // "type" : "response", @@ -1354,8 +1286,6 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data) resp.value(_(BODY)).toMap(). value(_("V8Version")).toString())); - } else if (debugCommand == _(V8FLAGS)) { - } else if (debugCommand == _(GARBAGECOLLECTOR)) { } else { // DO NOTHING } @@ -1866,56 +1796,6 @@ void QmlV8DebuggerClient::updateEvaluationResult(int sequence, bool success, } } -void QmlV8DebuggerClient::updateBreakpoints(const QVariant &bodyVal) -{ - // { "seq" : <number>, - // "type" : "response", - // "request_seq" : <number>, - // "command" : "listbreakpoints", - // "body" : { "breakpoints": [ { "type" : <string: "scriptId" or "scriptName".>, - // "script_id" : <int: script id. Only defined if type is scriptId.>, - // "script_name" : <string: script name. Only defined if type is scriptName.>, - // "number" : <int: breakpoint number. Starts from 1.>, - // "line" : <int: line number of this breakpoint. Starts from 0.>, - // "column" : <int: column number of this breakpoint. Starts from 0.>, - // "groupId" : <int: group id of this breakpoint.>, - // "hit_count" : <int: number of times this breakpoint has been hit. Starts from 0.>, - // "active" : <bool: true if this breakpoint is enabled.>, - // "ignoreCount" : <int: remaining number of times to ignore breakpoint. Starts from 0.>, - // "actual_locations" : <actual locations of the breakpoint.>, - // } - // ], - // "breakOnExceptions" : <true if break on all exceptions is enabled>, - // "breakOnUncaughtExceptions" : <true if break on uncaught exceptions is enabled> - // } - // "running" : <is the VM running after sending this response> - // "success" : true - // } - - const QVariantMap body = bodyVal.toMap(); - const QVariantList breakpoints = body.value(_("breakpoints")).toList(); - BreakHandler *handler = d->engine->breakHandler(); - - foreach (const QVariant &breakpoint, breakpoints) { - const QVariantMap breakpointData = breakpoint.toMap(); - - int index = breakpointData.value(_("number")).toInt(); - BreakpointModelId id = d->breakpoints.key(index); - BreakpointResponse br = handler->response(id); - - const QVariantList actualLocations = breakpointData.value(_("actual_locations")).toList(); - foreach (const QVariant &location, actualLocations) { - const QVariantMap locationData = location.toMap(); - br.lineNumber = locationData.value(_("line")).toInt() + 1; - br.enabled = breakpointData.value(_("active")).toBool(); - br.hitCount = breakpointData.value(_("hit_count")).toInt(); - br.ignoreCount = breakpointData.value(_("ignoreCount")).toInt(); - - handler->setResponse(id, br); - } - } -} - void QmlV8DebuggerClient::expandLocalsAndWatchers(const QVariant &bodyVal, const QVariant &refsVal) { // { "seq" : <number>, diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.h b/src/plugins/debugger/qml/qmlv8debuggerclient.h index 1d2f90bde1..fbd37c13a9 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.h +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.h @@ -109,8 +109,6 @@ private: void updateEvaluationResult(int sequence, bool success, const QVariant &bodyVal, const QVariant &refsVal); - void updateBreakpoints(const QVariant &bodyVal); - void expandLocalsAndWatchers(const QVariant &bodyVal, const QVariant &refsVal); QList<WatchData> createWatchDataList(const WatchData *parent, const QVariantList &properties, diff --git a/src/plugins/debugger/qml/qmlv8debuggerclientconstants.h b/src/plugins/debugger/qml/qmlv8debuggerclientconstants.h index d8bc5d274a..217f076960 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclientconstants.h +++ b/src/plugins/debugger/qml/qmlv8debuggerclientconstants.h @@ -83,11 +83,8 @@ const char SETBREAKPOINT[] = "setbreakpoint"; const char CHANGEBREAKPOINT[] = "changebreakpoint"; const char CLEARBREAKPOINT[] = "clearbreakpoint"; const char SETEXCEPTIONBREAK[] = "setexceptionbreak"; -const char V8FLAGS[] = "v8flags"; const char VERSION[] = "version"; const char DISCONNECT[] = "disconnect"; -const char LISTBREAKPOINTS[] = "listbreakpoints"; -const char GARBAGECOLLECTOR[] = "gc"; //const char PROFILE[] = "profile"; const char REQUEST[] = "request"; |