BaseQtVersion: Get rid of call to waitForStarted()

This is unneeded when followed by waitForFinished().

Change-Id: If2f419aca9856c5413754e0be15d828be01eb353
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-06-29 18:43:51 +02:00
parent 360f9ed7c6
commit 369ec34d05
+3 -10
View File
@@ -1793,8 +1793,6 @@ static QByteArray runQmakeQuery(const FilePath &binary, const Environment &env,
{
QTC_ASSERT(error, return QByteArray());
const int timeOutMS = 30000; // Might be slow on some machines.
// Prevent e.g. qmake 4.x on MinGW to show annoying errors about missing dll's.
WindowsCrashDialogBlocker crashDialogBlocker;
@@ -1803,14 +1801,9 @@ static QByteArray runQmakeQuery(const FilePath &binary, const Environment &env,
process.setCommand({binary, {"-query"}});
process.start();
if (!process.waitForStarted()) {
*error = QCoreApplication::translate("QtVersion", "Cannot start \"%1\": %2")
.arg(binary.displayName()).arg(process.errorString());
return {};
}
if (!process.waitForFinished(timeOutMS)) {
*error = QCoreApplication::translate("QtVersion", "Timeout running \"%1\" (%2 ms).")
.arg(binary.displayName()).arg(timeOutMS);
if (!process.waitForFinished()) {
*error = QCoreApplication::translate("QtVersion", "Timeout running \"%1\".")
.arg(binary.displayName());
return {};
}
if (process.exitStatus() != QProcess::NormalExit) {