Commit 26ba9e62 authored by Riho Pihlak's avatar Riho Pihlak

UpdateInfo: Fix checking for updates

Checking for updates failed when MaintenanceTool printed out log
messages. MaintenanceTool is expected to print out only xml data. So,
parsing the output failed.

MaintenanceTool printed out warnings about SSL and Qt account.

Logging is now disabled when running MaintenanceTool.

Change-Id: Ib163dae81368c8fec7218e5961590e07c208a73e
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 8f339794
......@@ -123,7 +123,9 @@ void UpdateInfoPlugin::startCheckForUpdates()
{
stopCheckForUpdates();
d->m_checkUpdatesCommand = new ShellCommand(QString(), QProcessEnvironment());
QProcessEnvironment env;
env.insert("QT_LOGGING_RULES", "*=false");
d->m_checkUpdatesCommand = new ShellCommand(QString(), env);
connect(d->m_checkUpdatesCommand, &ShellCommand::stdOutText, this, &UpdateInfoPlugin::collectCheckForUpdatesOutput);
connect(d->m_checkUpdatesCommand, &ShellCommand::finished, this, &UpdateInfoPlugin::checkForUpdatesFinished);
d->m_checkUpdatesCommand->addJob(Utils::FileName(QFileInfo(d->m_maintenanceTool)), QStringList(QLatin1String("--checkupdates")));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment