shift-shell/kded/startdaemon.cpp
Devin Lin d2b5416513 kded: Add startup settings manager
This adds a new component that manages Plasma Mobile specific configuration on every session startup. It also restores configuration when logged into a desktop session. 

This allows us to remove https://invent.kde.org/plasma-mobile/plasma-phone-settings, as well as configuration that was set in the look and feel. This also gives us an easy way to control configuration upgrade paths, and in the future, add ways for the configuration to easily be reset for debugging purposes.
2023-02-23 16:43:38 +00:00

23 lines
600 B
C++

// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
#include <KIO/CommandLauncherJob>
#include <KNotificationJobUiDelegate>
#include <KPluginFactory>
#include <KPluginLoader>
#include <QProcess>
#include "settings.h"
#include "startdaemon.h"
K_PLUGIN_CLASS_WITH_JSON(PlasmaMobileStartDaemon, "kded_plasma-mobile-start.json")
PlasmaMobileStartDaemon::PlasmaMobileStartDaemon(QObject *parent, const QList<QVariant> &)
: KDEDModule{parent}
{
// apply configuration
Settings::self()->applyConfiguration();
}
#include "startdaemon.moc"