summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-11-17 14:03:43 +0100
committerhjk <hjk@qt.io>2022-11-17 14:03:57 +0000
commite0b856f0b06f1f0b864ee4bcc230247f66122b24 (patch)
tree1a45a74e632a1d844d0b016386b0307bb2f80d78
parentc5296c0bf65fdc2742ab52219d484b53a93f549e (diff)
downloadqt-creator-e0b856f0b06f1f0b864ee4bcc230247f66122b24.tar.gz
Debugger: Remove DebuggerCommand::arg(FilePath)
It's better when the user code has to be explicit in what format and/or which parts of the FilePath is needed. Change-Id: I9d70e073f853a1bbc47c8482ebe77d7c4612b4b7 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/debugger/breakhandler.cpp2
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp5
-rw-r--r--src/plugins/debugger/debuggerprotocol.h1
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp4
-rw-r--r--src/plugins/debugger/lldb/lldbengine.cpp6
5 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 91e6c9c0d1..ea4b557a31 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -1114,7 +1114,7 @@ void BreakpointItem::addToCommand(DebuggerCommand *cmd) const
cmd->arg("function", requested.functionName);
cmd->arg("oneshot", requested.oneShot);
cmd->arg("enabled", requested.enabled);
- cmd->arg("file", requested.fileName);
+ cmd->arg("file", requested.fileName.path());
cmd->arg("line", requested.lineNumber);
cmd->arg("address", requested.address);
cmd->arg("expression", requested.expression);
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index 0bf60c3a4f..bf250b29d2 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -843,11 +843,6 @@ void DebuggerCommand::arg(const char *name, const QJsonValue &value)
args = addToJsonObject(args, name, value);
}
-void DebuggerCommand::arg(const char *name, const Utils::FilePath &filePath)
-{
- args = addToJsonObject(args, name, filePath.toString());
-}
-
static QJsonValue translateJsonToPython(const QJsonValue &value)
{
// TODO: Verify that this covers all incompatibilities between python and json,
diff --git a/src/plugins/debugger/debuggerprotocol.h b/src/plugins/debugger/debuggerprotocol.h
index 04a3369b2d..75a2586df4 100644
--- a/src/plugins/debugger/debuggerprotocol.h
+++ b/src/plugins/debugger/debuggerprotocol.h
@@ -41,7 +41,6 @@ public:
void arg(const char *name, const QList<int> &list);
void arg(const char *name, const QStringList &list); // Note: Hex-encodes.
void arg(const char *name, const QJsonValue &value);
- void arg(const char *name, const Utils::FilePath &filePath);
QString argsToPython() const;
QString argsToString() const;
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 29e0ab5e42..67e0dd72e5 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -4369,8 +4369,8 @@ void GdbEngine::setupInferior()
// postCommand("set architecture " + remoteArch);
if (!rp.solibSearchPath.isEmpty()) {
DebuggerCommand cmd("appendSolibSearchPath");
- for (const FilePath &path : rp.solibSearchPath)
- cmd.arg("path", path);
+ for (const FilePath &filePath : rp.solibSearchPath)
+ cmd.arg("path", filePath.path());
cmd.arg("separator", HostOsInfo::pathListSeparator());
runCommand(cmd);
}
diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp
index c1945565ce..3bebebec1a 100644
--- a/src/plugins/debugger/lldb/lldbengine.cpp
+++ b/src/plugins/debugger/lldb/lldbengine.cpp
@@ -332,7 +332,7 @@ void LldbEngine::runEngine()
showStatusMessage(Tr::tr("Running requested..."), 5000);
DebuggerCommand cmd("runEngine");
if (rp.startMode == AttachToCore)
- cmd.arg("coreFile", rp.coreFile);
+ cmd.arg("coreFile", rp.coreFile.path());
runCommand(cmd);
}
@@ -413,7 +413,7 @@ void LldbEngine::executeRunToLine(const ContextData &data)
{
notifyInferiorRunRequested();
DebuggerCommand cmd("executeRunToLocation");
- cmd.arg("file", data.fileName);
+ cmd.arg("file", data.fileName.path());
cmd.arg("line", data.lineNumber);
cmd.arg("address", data.address);
runCommand(cmd);
@@ -430,7 +430,7 @@ void LldbEngine::executeRunToFunction(const QString &functionName)
void LldbEngine::executeJumpToLine(const ContextData &data)
{
DebuggerCommand cmd("executeJumpToLocation");
- cmd.arg("file", data.fileName);
+ cmd.arg("file", data.fileName.path());
cmd.arg("line", data.lineNumber);
cmd.arg("address", data.address);
runCommand(cmd);