aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2015-11-24 11:10:00 +0100
committerUlf Hermann <[email protected]>2015-11-30 08:56:09 +0000
commit1e58db55b3342b45aa1edc94b75438a378266747 (patch)
treec59cbe228ccfb390b281497a4b2f6f17e654d546 /src/plugins
parente2097fe8ec6a719071a2dfff577c2de0bd073ec3 (diff)
QML Debugger: Add an explicit override for bool to DebuggerCommand
This makes sure we construct QJsonValues from bools, rather than casting them to ints. Change-Id: Ibc3e5322460e5bec153d80024219ba7935268d68 Task-number: QTCREATORBUG-15395 Reviewed-by: Ulf Hermann <[email protected]>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp5
-rw-r--r--src/plugins/debugger/debuggerprotocol.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index 35c2d220f35..23162320368 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -843,6 +843,11 @@ void DebuggerCommand::arg(const char *value)
args = arr;
}
+void DebuggerCommand::arg(const char *name, bool value)
+{
+ args = addToJsonObject(args, name, value);
+}
+
void DebuggerCommand::arg(const char *name, const QJsonValue &value)
{
args = addToJsonObject(args, name, value);
diff --git a/src/plugins/debugger/debuggerprotocol.h b/src/plugins/debugger/debuggerprotocol.h
index f85746a006a..d7849a5b927 100644
--- a/src/plugins/debugger/debuggerprotocol.h
+++ b/src/plugins/debugger/debuggerprotocol.h
@@ -58,6 +58,7 @@ public:
DebuggerCommand(const QByteArray &f, int fl, const Callback &cb) : function(f), callback(cb), flags(fl) {}
void arg(const char *value);
+ void arg(const char *name, bool value);
void arg(const char *name, int value);
void arg(const char *name, qlonglong value);
void arg(const char *name, qulonglong value);