diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index e6d54ad2e5c..7c70a3c31b0 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2824,10 +2824,10 @@ void CdbEngine::setupScripting(const DebuggerResponse &response) runCommand({"theDumper = Dumper()", ScriptCommand}); } - const QString path = debuggerSettings()->extraDumperFile.value(); - if (!path.isEmpty() && QFileInfo(path).isReadable()) { + const FilePath path = debuggerSettings()->extraDumperFile(); + if (!path.isEmpty() && path.isReadableFile()) { DebuggerCommand cmd("theDumper.addDumperModule", ScriptCommand); - cmd.arg("path", path); + cmd.arg("path", path.path()); runCommand(cmd); } const QString commands = debuggerSettings()->extraDumperCommands.value(); diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index 721d499dc58..038696f4bac 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -364,7 +364,6 @@ DebuggerSettings::DebuggerSettings() + "

"); extraDumperFile.setSettingsKey(debugModeGroup, "ExtraDumperFile"); - extraDumperFile.setDisplayStyle(StringAspect::PathChooserDisplay); extraDumperFile.setDisplayName(Tr::tr("Extra Debugging Helpers")); // Label text is intentional empty in the GUI. extraDumperFile.setToolTip(Tr::tr("Path to a Python file containing additional data dumpers.")); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index 40fabfef1eb..a6fb497815f 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -106,7 +106,7 @@ public: Utils::BoolAspect useDebuggingHelpers; Utils::BoolAspect useCodeModel; Utils::BoolAspect showThreadNames; - Utils::StringAspect extraDumperFile; // For loading a file. Recommended. + Utils::FilePathAspect extraDumperFile; // For loading a file. Recommended. Utils::StringAspect extraDumperCommands; // To modify an existing setup. Utils::BoolAspect showStdNamespace; diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index aa84c6d2d78..f69c9f72d7b 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4026,10 +4026,10 @@ void GdbEngine::handleGdbStarted() runCommand({"python from gdbbridge import *"}); } - const QString path = debuggerSettings()->extraDumperFile.value(); - if (!path.isEmpty() && QFileInfo(path).isReadable()) { + const FilePath path = debuggerSettings()->extraDumperFile(); + if (!path.isEmpty() && path.isReadableFile()) { DebuggerCommand cmd("addDumperModule"); - cmd.arg("path", path); + cmd.arg("path", path.path()); runCommand(cmd); } diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index ef4d7a4354d..09b5d6eaec9 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -228,10 +228,10 @@ void LldbEngine::handleLldbStarted() if (!commands.isEmpty()) executeCommand(commands); - const QString path = debuggerSettings()->extraDumperFile.value(); - if (!path.isEmpty() && QFileInfo(path).isReadable()) { + const FilePath path = debuggerSettings()->extraDumperFile(); + if (!path.isEmpty() && path.isReadableFile()) { DebuggerCommand cmd("addDumperModule"); - cmd.arg("path", path); + cmd.arg("path", path.path()); runCommand(cmd); }