Commit 04cac4c8 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

pk: Have the notifier listen to the correct for offline events

We need to know when the offline update has been triggered, We were
listening to the wrong object though and it was erratic. Now it will be
checking the triggered value correctly.
parent 25456fb8
...@@ -34,7 +34,7 @@ PackageKitNotifier::PackageKitNotifier(QObject* parent) ...@@ -34,7 +34,7 @@ PackageKitNotifier::PackageKitNotifier(QObject* parent)
connect(PackageKit::Daemon::global(), &PackageKit::Daemon::updatesChanged, this, &PackageKitNotifier::recheckSystemUpdateNeeded); connect(PackageKit::Daemon::global(), &PackageKit::Daemon::updatesChanged, this, &PackageKitNotifier::recheckSystemUpdateNeeded);
connect(PackageKit::Daemon::global(), &PackageKit::Daemon::transactionListChanged, this, &PackageKitNotifier::transactionListChanged); connect(PackageKit::Daemon::global(), &PackageKit::Daemon::transactionListChanged, this, &PackageKitNotifier::transactionListChanged);
connect(PackageKit::Daemon::global(), &PackageKit::Daemon::restartScheduled, this, &PackageKitNotifier::nowNeedsReboot); connect(PackageKit::Daemon::global(), &PackageKit::Daemon::restartScheduled, this, &PackageKitNotifier::nowNeedsReboot);
connect(PackageKit::Daemon::global(), &PackageKit::Daemon::changed, this, [this]{ connect(PackageKit::Daemon::global()->offline(), &PackageKit::Offline::changed, this, [this]{
if (PackageKit::Daemon::global()->offline()->updateTriggered()) if (PackageKit::Daemon::global()->offline()->updateTriggered())
nowNeedsReboot(); nowNeedsReboot();
}); });
......
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