File indexing completed on 2024-04-21 05:45:11
0001 /* 0002 SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 #include <KPluginFactory> 0007 #include <KDEDModule> 0008 0009 #include "distroreleasenotifier.h" 0010 #include "screensaverinhibitor.h" 0011 0012 class Module : public KDEDModule 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit Module(QObject *parent, const QVariantList &args) 0017 : KDEDModule(parent) 0018 { 0019 Q_UNUSED(args); 0020 } 0021 0022 private: 0023 // NB: we are not using kdbusservice because it's largely useless. 0024 // This service is only ever started via autostart and if not asserting 0025 // that registering the service is good enough for our purposes. 0026 DistroReleaseNotifier mainObject; 0027 0028 // Do not lazy init this on setting up the notification. It makes a 5kb 0029 // difference if we have the dbusservice under monitoring or not. 0030 ScreenSaverInhibitor inhibitor; 0031 }; 0032 0033 K_PLUGIN_FACTORY_WITH_JSON(DistroReleaseNotifierModuleFactory, 0034 "distro-release-notifier.json", 0035 registerPlugin<Module>();) 0036 0037 #include "module.moc"