From 9b86824818ef6ca03aa6dbdbab1ef54e0efc6923 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 7 Nov 2013 14:18:21 +0100 Subject: Remove unused code from the QML debugger client. Change-Id: I286c690e4e54c766ae4d345add3f78e867863005 Reviewed-by: hjk --- src/plugins/debugger/qml/qmlv8debuggerclient.cpp | 120 --------------------- src/plugins/debugger/qml/qmlv8debuggerclient.h | 2 - .../debugger/qml/qmlv8debuggerclientconstants.h | 3 - 3 files changed, 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" : , - // "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" : , - // "type" : "request", - // "command" : "v8flags", - // "arguments" : { "flags" : - // } - // } - 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" : , @@ -731,29 +690,6 @@ void QmlV8DebuggerClientPrivate::version() // q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8())); //} -void QmlV8DebuggerClientPrivate::gc() -{ - // { "seq" : , - // "type" : "request", - // "command" : "gc", - // "arguments" : { "type" : , - // } - // } - 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" : , // "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" : , - // "type" : "response", - // "request_seq" : , - // "command" : "listbreakpoints", - // "body" : { "breakpoints": [ { "type" : , - // "script_id" : , - // "script_name" : , - // "number" : , - // "line" : , - // "column" : , - // "groupId" : , - // "hit_count" : , - // "active" : , - // "ignoreCount" : , - // "actual_locations" : , - // } - // ], - // "breakOnExceptions" : , - // "breakOnUncaughtExceptions" : - // } - // "running" : - // "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" : , 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 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"; -- cgit v1.2.1