diff options
author | hjk <hjk@qt.io> | 2019-06-20 17:19:12 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-06-21 10:32:31 +0000 |
commit | 1396c6e8e99d69291117b31fe5d31636ff8831ff (patch) | |
tree | 01e7206aea1b889ae1d0b3e1d79dd6b666ef9018 /src/plugins/debugger/debuggerplugin.cpp | |
parent | 18eb0b39c517019c9fec711c055b5d42f20aae10 (diff) |
ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 55522ce05f..26c075dfe1 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -851,7 +851,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, Kit *kit = nullptr; DebuggerStartMode startMode = StartExternal; - QString executable; + FilePath executable; QString remoteChannel; QString coreFile; bool useTerminal = false; @@ -864,7 +864,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, if (key.isEmpty()) { continue; } else if (executable.isEmpty()) { - executable = key; + executable = FilePath::fromString(key); } else { *errorMessage = DebuggerPlugin::tr("Only one executable allowed."); return false; @@ -885,7 +885,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, } } if (!kit) - kit = guessKitFromAbis(Abi::abisOfBinary(FilePath::fromString(executable))); + kit = guessKitFromAbis(Abi::abisOfBinary(executable)); auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE); runControl->setKit(kit); @@ -910,8 +910,8 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it, debugger->setStartMessage(tr("Attaching to core file %1.").arg(coreFile)); } else { debugger->setStartMode(StartExternal); - debugger->setRunControlName(tr("Executable file \"%1\"").arg(executable)); - debugger->setStartMessage(tr("Debugging file %1.").arg(executable)); + debugger->setRunControlName(tr("Executable file \"%1\"").arg(executable.toUserOutput())); + debugger->setStartMessage(tr("Debugging file %1.").arg(executable.toUserOutput())); } debugger->setUseTerminal(useTerminal); @@ -1588,7 +1588,7 @@ void DebuggerPluginPrivate::attachCore() if (dlg.exec() != QDialog::Accepted) return; - setConfigValue("LastExternalExecutableFile", dlg.symbolFile()); + setConfigValue("LastExternalExecutableFile", dlg.symbolFile().toVariant()); setConfigValue("LastLocalCoreFile", dlg.localCoreFile()); setConfigValue("LastRemoteCoreFile", dlg.remoteCoreFile()); setConfigValue("LastExternalKit", dlg.kit()->id().toSetting()); @@ -1743,7 +1743,7 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit, runControl->setDisplayName(tr("Process %1").arg(process.pid)); auto debugger = new DebuggerRunTool(runControl); debugger->setAttachPid(ProcessHandle(process.pid)); - debugger->setInferiorExecutable(process.exe); + debugger->setInferiorExecutable(FilePath::fromString(process.exe)); debugger->setInferiorDevice(device); debugger->setStartMode(AttachExternal); debugger->setCloseMode(DetachAtClose); |