diff --git a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp index 2dc1ea932b1..92858969ec3 100644 --- a/src/plugins/debugger/debuggersourcepathmappingwidget.cpp +++ b/src/plugins/debugger/debuggersourcepathmappingwidget.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -444,11 +443,9 @@ static QString findQtInstallPath(const FilePath &qmakePath) { if (qmakePath.isEmpty()) return QString(); - QProcess proc; - QStringList args; - args.append("-query"); - args.append("QT_INSTALL_HEADERS"); - proc.start(qmakePath.toString(), args); + QtcProcess proc; + proc.setCommand({qmakePath, {"-query", "QT_INSTALL_HEADERS"}}); + proc.start(); if (!proc.waitForStarted()) { qWarning("%s: Cannot start '%s': %s", Q_FUNC_INFO, qPrintable(qmakePath.toString()), qPrintable(proc.errorString())); @@ -456,7 +453,7 @@ static QString findQtInstallPath(const FilePath &qmakePath) } proc.closeWriteChannel(); if (!proc.waitForFinished()) { - SynchronousProcess::stopProcess(proc); + proc.stopProcess(); qWarning("%s: Timeout running '%s'.", Q_FUNC_INFO, qPrintable(qmakePath.toString())); return QString(); }