From 1e58db55b3342b45aa1edc94b75438a378266747 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 24 Nov 2015 11:10:00 +0100 Subject: [PATCH] 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 --- src/plugins/debugger/debuggerprotocol.cpp | 5 +++++ src/plugins/debugger/debuggerprotocol.h | 1 + 2 files changed, 6 insertions(+) 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);