ProjectExplorer: Fix uses of "FilePath::toString"

Change-Id: I7199dec620b7e09765c44b571b93575eda5c5a74
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-07-30 10:05:27 +02:00
parent b4250871ec
commit e37796d1c6

View File

@@ -103,8 +103,8 @@ FilePath ProcessParameters::effectiveCommand() const
// Assume this is already good. FIXME: It is possibly not, so better fix searchInPath. // Assume this is already good. FIXME: It is possibly not, so better fix searchInPath.
m_effectiveCommand = cmd; m_effectiveCommand = cmd;
} else { } else {
m_effectiveCommand = m_runData.environment.searchInPath(cmd.toString(), m_effectiveCommand
{effectiveWorkingDirectory()}); = m_runData.environment.searchInPath(cmd.path(), {effectiveWorkingDirectory()});
} }
m_commandMissing = m_effectiveCommand.isEmpty(); m_commandMissing = m_effectiveCommand.isEmpty();
if (m_commandMissing) if (m_commandMissing)
@@ -135,10 +135,10 @@ QString ProcessParameters::effectiveArguments() const
QString ProcessParameters::prettyCommand() const QString ProcessParameters::prettyCommand() const
{ {
QString cmd = m_runData.command.executable().toString(); FilePath cmd = m_runData.command.executable();
if (m_macroExpander) if (m_macroExpander)
cmd = m_macroExpander->expand(cmd); cmd = m_macroExpander->expand(cmd);
return FilePath::fromString(cmd).fileName(); return cmd.fileName();
} }
QString ProcessParameters::prettyArguments() const QString ProcessParameters::prettyArguments() const
@@ -183,7 +183,7 @@ QString ProcessParameters::summaryInWorkdir(const QString &displayName) const
displayName, displayName,
ProcessArgs::quoteArg(prettyCommand()).toHtmlEscaped(), ProcessArgs::quoteArg(prettyCommand()).toHtmlEscaped(),
prettyArguments().toHtmlEscaped(), prettyArguments().toHtmlEscaped(),
QDir::toNativeSeparators(effectiveWorkingDirectory().toString())); effectiveWorkingDirectory().toUserOutput());
} }
} // ProcessExplorer } // ProcessExplorer