aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/updateinfo
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-04-25 13:27:09 +0200
committerEike Ziller <eike.ziller@qt.io>2016-04-25 13:27:14 +0200
commita3880c4916cce1fac2c033ef291a83a887accdc6 (patch)
tree6a5bc23823edd3b645a63f48f059460aa6dc51c1 /src/plugins/updateinfo
parent452ea6a662a62e44081ea93434128b4e094db7cc (diff)
parent728229690af3a5357c59790b58e10e9edddb3756 (diff)
Merge remote-tracking branch 'origin/4.0'
Diffstat (limited to 'src/plugins/updateinfo')
-rw-r--r--src/plugins/updateinfo/updateinfoplugin.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/plugins/updateinfo/updateinfoplugin.cpp b/src/plugins/updateinfo/updateinfoplugin.cpp
index a8c7ea64b9..d17bcfe5b2 100644
--- a/src/plugins/updateinfo/updateinfoplugin.cpp
+++ b/src/plugins/updateinfo/updateinfoplugin.cpp
@@ -33,6 +33,7 @@
#include <coreplugin/settingsdatabase.h>
#include <coreplugin/shellcommand.h>
#include <utils/fileutils.h>
+#include <utils/synchronousprocess.h>
#include <QDate>
#include <QDomDocument>
@@ -60,6 +61,13 @@ using namespace Core;
namespace UpdateInfo {
namespace Internal {
+class IgnoreExitCode : public Utils::ExitCodeInterpreter
+{
+public:
+ IgnoreExitCode(QObject *parent);
+ Utils::SynchronousProcessResponse::Result interpretExitCode(int code) const override;
+};
+
class UpdateInfoPluginPrivate
{
public:
@@ -76,6 +84,16 @@ public:
QDate m_lastCheckDate;
};
+IgnoreExitCode::IgnoreExitCode(QObject *parent)
+ : Utils::ExitCodeInterpreter(parent)
+{
+}
+
+Utils::SynchronousProcessResponse::Result IgnoreExitCode::interpretExitCode(int code) const
+{
+ Q_UNUSED(code)
+ return Utils::SynchronousProcessResponse::Finished;
+}
UpdateInfoPlugin::UpdateInfoPlugin()
: d(new UpdateInfoPluginPrivate)
@@ -123,10 +141,13 @@ void UpdateInfoPlugin::startCheckForUpdates()
{
stopCheckForUpdates();
- d->m_checkUpdatesCommand = new ShellCommand(QString(), QProcessEnvironment());
+ QProcessEnvironment env;
+ env.insert(QLatin1String("QT_LOGGING_RULES"), QLatin1String("*=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")));
+ d->m_checkUpdatesCommand->addJob(Utils::FileName(QFileInfo(d->m_maintenanceTool)), QStringList(QLatin1String("--checkupdates")),
+ /*workingDirectory=*/QString(), new IgnoreExitCode(d->m_checkUpdatesCommand));
d->m_checkUpdatesCommand->execute();
emit checkForUpdatesRunningChanged(true);
}