Commit 05a6d491 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Initialize the reboot state if it already needed reboot

parent 8fa275ea
......@@ -82,6 +82,11 @@ PackageKitNotifier::PackageKitNotifier(QObject* parent)
QFileSystemWatcher* watcher = new QFileSystemWatcher(this);
watcher->addPath(QStringLiteral(PK_OFFLINE_ACTION_FILENAME));
connect(watcher, &QFileSystemWatcher::fileChanged, this, &PackageKitNotifier::nowNeedsReboot);
QTimer::singleShot(100, this, [this](){
if (QFile::exists(QStringLiteral(PK_OFFLINE_ACTION_FILENAME)))
nowNeedsReboot();
});
}
PackageKitNotifier::~PackageKitNotifier()
......
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