Make trivial config modules cpp file only

This commit is contained in:
Alexander Lohnau 2023-06-10 10:53:50 +02:00
parent 0989b762f1
commit 5d1fb152a3
4 changed files with 34 additions and 58 deletions

View file

@ -4,16 +4,21 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "hotspotsettings.h"
#include <KLocalizedString>
#include <KPluginFactory>
#include <KQuickConfigModule>
class HotspotSettings : public KQuickConfigModule
{
Q_OBJECT
public:
HotspotSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData)
{
}
};
K_PLUGIN_CLASS_WITH_JSON(HotspotSettings, "kcm_mobile_hotspot.json")
HotspotSettings::HotspotSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData)
{
}
#include "hotspotsettings.moc"

View file

@ -1,19 +0,0 @@
/*
SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef HOTSPOTSETTINGS_H
#define HOTSPOTSETTINGS_H
#include <KQuickConfigModule>
class HotspotSettings : public KQuickConfigModule
{
Q_OBJECT
public:
HotspotSettings(QObject *parent, const KPluginMetaData &metaData);
};
#endif // HOTSPOTSETTINGS_H

View file

@ -3,16 +3,30 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "kcm.h"
#include <KPluginFactory>
#include <KConfigGroup>
#include <KQuickManagedConfigModule>
#include <KSharedConfig>
class KCMMobileShell : public KQuickManagedConfigModule
{
Q_OBJECT
public:
KCMMobileShell(QObject *parent, const KPluginMetaData &data)
: KQuickManagedConfigModule(parent, data)
{
setButtons({});
}
Q_SIGNALS:
void navigationPanelEnabledChanged();
private:
KSharedConfig::Ptr m_config;
};
K_PLUGIN_CLASS_WITH_JSON(KCMMobileShell, "kcm_mobileshell.json")
KCMMobileShell::KCMMobileShell(QObject *parent, const KPluginMetaData &data)
: KQuickManagedConfigModule(parent, data)
{
setButtons({});
}
#include "kcm.moc"

View file

@ -1,24 +0,0 @@
/**
* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <KConfigGroup>
#include <KQuickManagedConfigModule>
#include <KSharedConfig>
class KCMMobileShell : public KQuickManagedConfigModule
{
Q_OBJECT
public:
KCMMobileShell(QObject *parent, const KPluginMetaData &data);
Q_SIGNALS:
void navigationPanelEnabledChanged();
private:
KSharedConfig::Ptr m_config;
};