diff options
| author | hjk <[email protected]> | 2019-06-06 16:27:55 +0200 |
|---|---|---|
| committer | hjk <[email protected]> | 2019-06-11 08:11:07 +0000 |
| commit | ca4ba34229c247027074c25abf51bf02ff15af96 (patch) | |
| tree | f5f93acda470948ec0f07b1dbfe5a58333bcb8bb /src/plugins/debugger | |
| parent | 021d3a6c59264e4aac0284628b8d2daadbad4ed7 (diff) | |
Use Utils::FilePath in SynchronousProcess
Adapt callers and surrounding code.
Change-Id: Ie6c1883a44169cf9d790d06b660f46d24dc24c89
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger')
| -rw-r--r-- | src/plugins/debugger/debuggeritem.cpp | 11 | ||||
| -rw-r--r-- | src/plugins/debugger/debuggeritemmanager.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index c17766361c7..f854c1474f2 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -64,12 +64,12 @@ const char DEBUGGER_INFORMATION_WORKINGDIRECTORY[] = "WorkingDirectory"; //! Return the configuration of gdb as a list of --key=value //! \note That the list will also contain some output not in this format. -static QString getConfigurationOfGdbCommand(const QString &command) +static QString getConfigurationOfGdbCommand(const FilePath &command) { // run gdb with the --configuration opion Utils::SynchronousProcess gdbConfigurationCall; Utils::SynchronousProcessResponse output = - gdbConfigurationCall.runBlocking(command, {QString("--configuration")}); + gdbConfigurationCall.runBlocking({command, {"--configuration"}}); return output.allOutput(); } @@ -142,15 +142,14 @@ void DebuggerItem::reinitializeFromFile() // CDB only understands the single-dash -version, whereas GDB and LLDB are // happy with both -version and --version. So use the "working" -version // except for the experimental LLDB-MI which insists on --version. - const char *version = "-version"; + QString version = "-version"; const QFileInfo fileInfo = m_command.toFileInfo(); m_lastModified = fileInfo.lastModified(); if (fileInfo.baseName().toLower().contains("lldb-mi")) version = "--version"; SynchronousProcess proc; - SynchronousProcessResponse response - = proc.runBlocking(m_command.toString(), {QLatin1String(version)}); + SynchronousProcessResponse response = proc.runBlocking({m_command, {version}}); if (response.result != SynchronousProcessResponse::Finished) { m_engineType = NoEngineType; return; @@ -173,7 +172,7 @@ void DebuggerItem::reinitializeFromFile() const bool unableToFindAVersion = (0 == version); const bool gdbSupportsConfigurationFlag = (version >= 70700); if (gdbSupportsConfigurationFlag || unableToFindAVersion) { - const auto gdbConfiguration = getConfigurationOfGdbCommand(m_command.toString()); + const auto gdbConfiguration = getConfigurationOfGdbCommand(m_command); const auto gdbTargetAbiString = extractGdbTargetAbiStringFromGdbOutput(gdbConfiguration); if (!gdbTargetAbiString.isEmpty()) { diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 6d1e14cff85..4020995ce2b 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -727,7 +727,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers() SynchronousProcess lldbInfo; lldbInfo.setTimeoutS(2); SynchronousProcessResponse response - = lldbInfo.runBlocking("xcrun", {"--find", "lldb"}); + = lldbInfo.runBlocking(CommandLine(FilePath::fromString("xcrun"), {"--find", "lldb"})); if (response.result == Utils::SynchronousProcessResponse::Finished) { QString lPath = response.allOutput().trimmed(); if (!lPath.isEmpty()) { diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 48ca22f1b02..540f09ab77c 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4679,7 +4679,8 @@ CoreInfo CoreInfo::readExecutableNameFromCore(const Runnable &debugger, const QS QStringList envLang = QProcess::systemEnvironment(); Utils::Environment::setupEnglishOutput(&envLang); proc.setEnvironment(envLang); - SynchronousProcessResponse response = proc.runBlocking(debugger.executable, args); + SynchronousProcessResponse response + = proc.runBlocking({FilePath::fromString(debugger.executable), args}); if (response.result == SynchronousProcessResponse::Finished) { QString output = response.stdOut(); |
