Process: Change signature of waitForXxx() functions

Change the arg to QDeadlineTimer type.

Change-Id: Id3dee0717e44130c16baf7925e5b06346a1a1ad1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2024-01-22 18:59:10 +01:00
parent f86ada790a
commit 63fc22e274
25 changed files with 78 additions and 67 deletions

View File

@@ -27,6 +27,7 @@ const char commonArgsKey[] = "Common Arguments:";
using namespace Utils;
using namespace std::chrono;
using namespace std::chrono_literals;
namespace Android {
namespace Internal {
@@ -528,7 +529,7 @@ void AndroidSdkManagerPrivate::getPendingLicense(SdkCmdPromise &fi)
licenseCommand.start();
QTextCodec *codec = QTextCodec::codecForLocale();
int inputCounter = 0, steps = -1;
while (!licenseCommand.waitForFinished(200)) {
while (!licenseCommand.waitForFinished(200ms)) {
QString stdOut = codec->toUnicode(licenseCommand.readAllRawStandardOutput());
bool assertionFound = false;
if (!stdOut.isEmpty())
@@ -556,9 +557,9 @@ void AndroidSdkManagerPrivate::getPendingLicense(SdkCmdPromise &fi)
if (fi.isCanceled()) {
licenseCommand.terminate();
if (!licenseCommand.waitForFinished(300)) {
if (!licenseCommand.waitForFinished(300ms)) {
licenseCommand.kill();
licenseCommand.waitForFinished(200);
licenseCommand.waitForFinished(200ms);
}
}
if (licenseCommand.state() == QProcess::NotRunning)