Blob Blame History Raw
From 4150bd6264d209b300598abea14fd9fce63c2f6e Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <antonio.larrosa@gmail.com>
Date: Wed, 3 Apr 2019 14:21:29 +0200
Subject: [PATCH 06/51] Don't force a check for updates when the applet runs

Summary:
The timer in main.qml has "triggeredOnStart: true" so it already
checks when the applet runs if the condition to check for updates
is true and if so, it calls PkUpdates.checkUpdates.

Previously, if a user configures the applet so that it only checks
for updates weekly, the applet ignores this configuration and
forces a check for updates every time the user logs in the system
(even more than once per day)

Reviewers: jgrulich

Reviewed By: jgrulich

Differential Revision: https://phabricator.kde.org/D20231
---
 src/declarative/main.cpp        | 1 -
 src/plasma/contents/ui/main.qml | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/src/declarative/main.cpp b/src/declarative/main.cpp
index ddb76e9..1db16e6 100644
--- a/src/declarative/main.cpp
+++ b/src/declarative/main.cpp
@@ -29,7 +29,6 @@ int main(int argc, char *argv[])
 
     PkUpdates * upd = new PkUpdates(qApp);
     QObject::connect(upd, &PkUpdates::done, qApp, &QCoreApplication::quit);
-    upd->checkUpdates();
 
     return app.exec();
 }
diff --git a/src/plasma/contents/ui/main.qml b/src/plasma/contents/ui/main.qml
index d667a5c..b18f15d 100644
--- a/src/plasma/contents/ui/main.qml
+++ b/src/plasma/contents/ui/main.qml
@@ -95,9 +95,6 @@ Item
     }
 
     Component.onCompleted: {
-        if(!needsForcedUpdate() && batteryAllowed) {
-            PkUpdates.checkUpdates(false);
-        }
         timer.start()
     }
 }
-- 
2.28.0