From 53714b2b1d7a3613b6b02f1bc8eea6966e03b786 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 20 Oct 2021 14:00:58 +0200 Subject: [PATCH] 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 Reviewed-by: Katja Marttila --- src/plugins/updateinfo/updateinfoplugin.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/updateinfo/updateinfoplugin.cpp b/src/plugins/updateinfo/updateinfoplugin.cpp index 4137848c582..4d393a298bb 100644 --- a/src/plugins/updateinfo/updateinfoplugin.cpp +++ b/src/plugins/updateinfo/updateinfoplugin.cpp @@ -129,16 +129,17 @@ void UpdateInfoPlugin::startCheckForUpdates() { stopCheckForUpdates(); - Utils::Environment env = Utils::Environment::systemEnvironment(); - env.set("QT_LOGGING_RULES", "*=false"); - d->m_checkUpdatesCommand = new ShellCommand({}, env); + d->m_checkUpdatesCommand = new ShellCommand({}, Utils::Environment::systemEnvironment()); 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"}}, + d->m_checkUpdatesCommand->addJob({Utils::FilePath::fromString(d->m_maintenanceTool), + {"ch", "-g", "*=false,ifw.package.*=true"}}, 60 * 3, // 3 minutes timeout /*workingDirectory=*/{}, - [](int /*exitCode*/) { return Utils::QtcProcess::FinishedWithSuccess; }); + [](int /*exitCode*/) { + return Utils::QtcProcess::FinishedWithSuccess; + }); d->m_checkUpdatesCommand->execute(); d->m_progress = d->m_checkUpdatesCommand->futureProgress(); if (d->m_progress) {