forked from qt-creator/qt-creator
UpdateInfo: Use new MaintenanceTool semantics
It's been available since a while, and is the preferred way to use it nowadays. Task-number: QTIFW-2349 Change-Id: Ic55f209ab7068d1d093cf92cb21e33794c0b04f1 Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
This commit is contained in:
@@ -129,16 +129,17 @@ void UpdateInfoPlugin::startCheckForUpdates()
|
|||||||
{
|
{
|
||||||
stopCheckForUpdates();
|
stopCheckForUpdates();
|
||||||
|
|
||||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
d->m_checkUpdatesCommand = new ShellCommand({}, Utils::Environment::systemEnvironment());
|
||||||
env.set("QT_LOGGING_RULES", "*=false");
|
|
||||||
d->m_checkUpdatesCommand = new ShellCommand({}, env);
|
|
||||||
d->m_checkUpdatesCommand->setDisplayName(tr("Checking for Updates"));
|
d->m_checkUpdatesCommand->setDisplayName(tr("Checking for Updates"));
|
||||||
connect(d->m_checkUpdatesCommand, &ShellCommand::stdOutText, this, &UpdateInfoPlugin::collectCheckForUpdatesOutput);
|
connect(d->m_checkUpdatesCommand, &ShellCommand::stdOutText, this, &UpdateInfoPlugin::collectCheckForUpdatesOutput);
|
||||||
connect(d->m_checkUpdatesCommand, &ShellCommand::finished, this, &UpdateInfoPlugin::checkForUpdatesFinished);
|
connect(d->m_checkUpdatesCommand, &ShellCommand::finished, this, &UpdateInfoPlugin::checkForUpdatesFinished);
|
||||||
d->m_checkUpdatesCommand->addJob({Utils::FilePath::fromString(d->m_maintenanceTool), {"--checkupdates"}},
|
d->m_checkUpdatesCommand->addJob({Utils::FilePath::fromString(d->m_maintenanceTool),
|
||||||
|
{"ch", "-g", "*=false,ifw.package.*=true"}},
|
||||||
60 * 3, // 3 minutes timeout
|
60 * 3, // 3 minutes timeout
|
||||||
/*workingDirectory=*/{},
|
/*workingDirectory=*/{},
|
||||||
[](int /*exitCode*/) { return Utils::QtcProcess::FinishedWithSuccess; });
|
[](int /*exitCode*/) {
|
||||||
|
return Utils::QtcProcess::FinishedWithSuccess;
|
||||||
|
});
|
||||||
d->m_checkUpdatesCommand->execute();
|
d->m_checkUpdatesCommand->execute();
|
||||||
d->m_progress = d->m_checkUpdatesCommand->futureProgress();
|
d->m_progress = d->m_checkUpdatesCommand->futureProgress();
|
||||||
if (d->m_progress) {
|
if (d->m_progress) {
|
||||||
|
Reference in New Issue
Block a user