Remove more unused code from the QML debugger client.

Change-Id: I672c1aee70b74a2763fef8584aa057f1f497aff6
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Erik Verbruggen
2013-11-07 15:23:26 +01:00
committed by hjk
parent ae55018548
commit 819752c9e4
2 changed files with 2 additions and 110 deletions

View File

@@ -87,7 +87,7 @@ public:
void disconnect();
void interrupt();
void continueDebugging(QmlV8DebuggerClient::StepAction stepAction, int stepCount = 1);
void continueDebugging(QmlV8DebuggerClient::StepAction stepAction);
void evaluate(const QString expr, bool global = false, bool disableBreak = false,
int frame = -1, bool addContext = false);
@@ -95,16 +95,12 @@ public:
void backtrace(int fromFrame = -1, int toFrame = -1, bool bottom = false);
void frame(int number = -1);
void scope(int number = -1, int frameNumber = -1);
void scopes(int frameNumber = -1);
void scripts(int types = 4, const QList<int> ids = QList<int>(),
bool includeSource = false, const QVariant filter = QVariant());
void source(int frame = -1, int fromLine = -1, int toLine = -1);
void setBreakpoint(const QString type, const QString target,
bool enabled = true,int line = 0, int column = 0,
const QString condition = QString(), int ignoreCount = -1);
void changeBreakpoint(int breakpoint, bool enabled = true,
const QString condition = QString(), int ignoreCount = -1);
void clearBreakpoint(int breakpoint);
void setExceptionBreak(QmlV8DebuggerClient::Exceptions type, bool enabled = false);
@@ -179,8 +175,7 @@ void QmlV8DebuggerClientPrivate::interrupt()
q->sendMessage(packMessage(INTERRUPT));
}
void QmlV8DebuggerClientPrivate::continueDebugging(QmlV8DebuggerClient::StepAction action,
int count)
void QmlV8DebuggerClientPrivate::continueDebugging(QmlV8DebuggerClient::StepAction action)
{
// { "seq" : <number>,
// "type" : "request",
@@ -207,8 +202,6 @@ void QmlV8DebuggerClientPrivate::continueDebugging(QmlV8DebuggerClient::StepActi
break;
default:break;
}
if (count != 1)
args.setProperty(_(STEPCOUNT), QScriptValue(count));
jsonVal.setProperty(_(ARGUMENTS), args);
}
@@ -393,30 +386,6 @@ void QmlV8DebuggerClientPrivate::scope(int number, int frameNumber)
q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8()));
}
void QmlV8DebuggerClientPrivate::scopes(int frameNumber)
{
// { "seq" : <number>,
// "type" : "request",
// "command" : "scopes",
// "arguments" : { "frameNumber" : <frame number, optional uses selected
// frame if missing>
// }
// }
QScriptValue jsonVal = initObject();
jsonVal.setProperty(_(COMMAND), QScriptValue(_(SCOPES)));
if (frameNumber != -1) {
QScriptValue args = parser.call(QScriptValue(), QScriptValueList() << QScriptValue(_(OBJECT)));
args.setProperty(_(FRAMENUMBER), QScriptValue(frameNumber));
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::scripts(int types, const QList<int> ids, bool includeSource,
const QVariant filter)
{
@@ -470,38 +439,6 @@ void QmlV8DebuggerClientPrivate::scripts(int types, const QList<int> ids, bool i
q->sendMessage(packMessage(V8REQUEST, jsonMessage.toString().toUtf8()));
}
void QmlV8DebuggerClientPrivate::source(int frame, int fromLine, int toLine)
{
// { "seq" : <number>,
// "type" : "request",
// "command" : "source",
// "arguments" : { "frame" : <frame number (default selected frame)>
// "fromLine" : <from line within the source default is line 0>
// "toLine" : <to line within the source this line is not included in
// the result default is the number of lines in the script>
// }
// }
QScriptValue jsonVal = initObject();
jsonVal.setProperty(_(COMMAND), QScriptValue(_(SOURCE)));
QScriptValue args = parser.call(QScriptValue(), QScriptValueList() << QScriptValue(_(OBJECT)));
if (frame != -1)
args.setProperty(_(FRAME), QScriptValue(frame));
if (fromLine != -1)
args.setProperty(_(FROMLINE), QScriptValue(fromLine));
if (toLine != -1)
args.setProperty(_(TOLINE), QScriptValue(toLine));
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::setBreakpoint(const QString type, const QString target,
bool enabled, int line, int column,
const QString condition, int ignoreCount)
@@ -560,41 +497,6 @@ void QmlV8DebuggerClientPrivate::setBreakpoint(const QString type, const QString
}
}
void QmlV8DebuggerClientPrivate::changeBreakpoint(int breakpoint, bool enabled,
const QString condition, int ignoreCount)
{
// { "seq" : <number>,
// "type" : "request",
// "command" : "changebreakpoint",
// "arguments" : { "breakpoint" : <number of the break point to clear>
// "enabled" : <initial enabled state. True or false,
// default is true>
// "condition" : <string with break point condition>
// "ignoreCount" : <number specifying the number of break point hits }
// }
QScriptValue jsonVal = initObject();
jsonVal.setProperty(_(COMMAND),
QScriptValue(_(CHANGEBREAKPOINT)));
QScriptValue args = parser.call(QScriptValue(), QScriptValueList() << QScriptValue(_(OBJECT)));
args.setProperty(_(BREAKPOINT), QScriptValue(breakpoint));
args.setProperty(_(ENABLED), QScriptValue(enabled));
if (!condition.isEmpty())
args.setProperty(_(CONDITION), QScriptValue(condition));
if (ignoreCount != -1)
args.setProperty(_(IGNORECOUNT), QScriptValue(ignoreCount));
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::clearBreakpoint(int breakpoint)
{
// { "seq" : <number>,
@@ -1204,9 +1106,6 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
}
} else if (debugCommand == _(CHANGEBREAKPOINT)) {
// DO NOTHING
} else if (debugCommand == _(CLEARBREAKPOINT)) {
// DO NOTHING
@@ -1231,8 +1130,6 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
if (success)
updateScope(resp.value(_(BODY)), resp.value(_(REFS)));
} else if (debugCommand == _(SCOPES)) {
} else if (debugCommand == _(SOURCE)) {
} else if (debugCommand == _(SCRIPTS)) {
// { "seq" : <number>,
// "type" : "response",