Utils: Make QtcProcess::{setW,w}orkingDirectory use FilePath

But keep the old setter for a while to ease transition.

Change-Id: If02b79b1fcd31fbf8b06ef26876c41af891127f9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2021-06-03 10:39:15 +02:00
parent c956d02200
commit accb1e6e08
10 changed files with 35 additions and 20 deletions

View File

@@ -3856,9 +3856,10 @@ void GdbEngine::setupEngine()
if (!m_gdbProc.waitForStarted()) {
handleGdbStartFailed();
QString msg;
QString wd = m_gdbProc.workingDirectory();
if (!QFileInfo(wd).isDir())
msg = failedToStartMessage() + ' ' + tr("The working directory \"%1\" is not usable.").arg(wd);
FilePath wd = m_gdbProc.workingDirectory();
if (!wd.isReadableDir())
msg = failedToStartMessage() + ' ' + tr("The working directory \"%1\" is not usable.")
.arg(wd.toUserOutput());
else
msg = RunWorker::userMessageForProcessError(QProcess::FailedToStart, rp.debugger.executable);
handleAdapterStartFailed(msg);