File 0004-Dont-force-a-check-for-updates-when-the-applet-runs.patch of Package plasma5-pk-updates

From 14ddc1c74e737184c57b7a1243d5831e3ee642c5 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] Don't force a check for updates when the applet runs

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)
---
 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.21.0

openSUSE Build Service is sponsored by