VCS: Use more FilePath in ShellCommand and surroundings

Change-Id: Ie8c5fac09b45a54bcbe9a876044b653e7fccede5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
hjk
2021-08-11 10:02:58 +02:00
parent 2aaa0a2180
commit bbde6ac9bf
21 changed files with 84 additions and 83 deletions

View File

@@ -131,13 +131,13 @@ void UpdateInfoPlugin::startCheckForUpdates()
Utils::Environment env = Utils::Environment::systemEnvironment();
env.set("QT_LOGGING_RULES", "*=false");
d->m_checkUpdatesCommand = new ShellCommand(QString(), env);
d->m_checkUpdatesCommand = new ShellCommand({}, env);
d->m_checkUpdatesCommand->setDisplayName(tr("Checking for Updates"));
connect(d->m_checkUpdatesCommand, &ShellCommand::stdOutText, this, &UpdateInfoPlugin::collectCheckForUpdatesOutput);
connect(d->m_checkUpdatesCommand, &ShellCommand::finished, this, &UpdateInfoPlugin::checkForUpdatesFinished);
d->m_checkUpdatesCommand->addJob({Utils::FilePath::fromString(d->m_maintenanceTool), {"--checkupdates"}},
60 * 3, // 3 minutes timeout
/*workingDirectory=*/QString(),
/*workingDirectory=*/{},
[](int /*exitCode*/) { return Utils::QtcProcess::FinishedWithSuccess; });
d->m_checkUpdatesCommand->execute();
d->m_progress = d->m_checkUpdatesCommand->futureProgress();