Remove unneeded QVariantList from KCM constructor args

The args are not needed and will be removed later in KF6
This commit is contained in:
Alexander Lohnau 2023-06-10 10:50:37 +02:00
parent 5479e29bd6
commit 0989b762f1
16 changed files with 25 additions and 50 deletions

View file

@ -17,8 +17,8 @@ K_PLUGIN_CLASS_WITH_JSON(CellularNetworkSettings, "kcm_cellular_network.json")
CellularNetworkSettings *CellularNetworkSettings::staticInst = nullptr; CellularNetworkSettings *CellularNetworkSettings::staticInst = nullptr;
CellularNetworkSettings::CellularNetworkSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) CellularNetworkSettings::CellularNetworkSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
, m_modemList{} , m_modemList{}
, m_simList{} , m_simList{}
{ {

View file

@ -68,7 +68,7 @@ class CellularNetworkSettings : public KQuickConfigModule
Q_PROPERTY(QList<InlineMessage *> messages READ messages NOTIFY messagesChanged) Q_PROPERTY(QList<InlineMessage *> messages READ messages NOTIFY messagesChanged)
public: public:
CellularNetworkSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); CellularNetworkSettings(QObject *parent, const KPluginMetaData &metaData);
static CellularNetworkSettings *instance(); static CellularNetworkSettings *instance();

View file

@ -11,12 +11,8 @@
K_PLUGIN_CLASS_WITH_JSON(HotspotSettings, "kcm_mobile_hotspot.json") K_PLUGIN_CLASS_WITH_JSON(HotspotSettings, "kcm_mobile_hotspot.json")
HotspotSettings::HotspotSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) HotspotSettings::HotspotSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
{
}
HotspotSettings::~HotspotSettings()
{ {
} }

View file

@ -13,8 +13,7 @@ class HotspotSettings : public KQuickConfigModule
{ {
Q_OBJECT Q_OBJECT
public: public:
HotspotSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); HotspotSettings(QObject *parent, const KPluginMetaData &metaData);
virtual ~HotspotSettings() override;
}; };
#endif // HOTSPOTSETTINGS_H #endif // HOTSPOTSETTINGS_H

View file

@ -13,8 +13,8 @@
K_PLUGIN_CLASS_WITH_JSON(Info, "kcm_mobile_info.json") K_PLUGIN_CLASS_WITH_JSON(Info, "kcm_mobile_info.json")
Info::Info(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) Info::Info(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
, m_distroInfo(new DistroInfo(this)) , m_distroInfo(new DistroInfo(this))
, m_softwareInfo(new SoftwareInfo(this)) , m_softwareInfo(new SoftwareInfo(this))
, m_hardwareInfo(new HardwareInfo(this)) , m_hardwareInfo(new HardwareInfo(this))

View file

@ -24,7 +24,7 @@ class Info : public KQuickConfigModule
HardwareInfo *hardwareInfo() const; HardwareInfo *hardwareInfo() const;
public: public:
Info(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); Info(QObject *parent, const KPluginMetaData &metaData);
Q_INVOKABLE void copyInfoToClipboard() const; Q_INVOKABLE void copyInfoToClipboard() const;

View file

@ -9,8 +9,8 @@
K_PLUGIN_CLASS_WITH_JSON(KCMMobileShell, "kcm_mobileshell.json") K_PLUGIN_CLASS_WITH_JSON(KCMMobileShell, "kcm_mobileshell.json")
KCMMobileShell::KCMMobileShell(QObject *parent, const KPluginMetaData &data, const QVariantList &args) KCMMobileShell::KCMMobileShell(QObject *parent, const KPluginMetaData &data)
: KQuickManagedConfigModule(parent, data, args) : KQuickManagedConfigModule(parent, data)
{ {
setButtons({}); setButtons({});
} }

View file

@ -14,8 +14,7 @@ class KCMMobileShell : public KQuickManagedConfigModule
Q_OBJECT Q_OBJECT
public: public:
KCMMobileShell(QObject *parent, const KPluginMetaData &data, const QVariantList &args); KCMMobileShell(QObject *parent, const KPluginMetaData &data);
virtual ~KCMMobileShell() override = default;
Q_SIGNALS: Q_SIGNALS:
void navigationPanelEnabledChanged(); void navigationPanelEnabledChanged();

View file

@ -45,8 +45,8 @@ const QMap<int, qreal> idxToMinutes = {
{NEVER, 0}, {NEVER, 0},
}; };
MobilePower::MobilePower(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) MobilePower::MobilePower(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
, m_batteries{new BatteryModel(this)} , m_batteries{new BatteryModel(this)}
, m_profilesConfig{KSharedConfig::openConfig("powermanagementprofilesrc", KConfig::SimpleConfig | KConfig::CascadeConfig)} , m_profilesConfig{KSharedConfig::openConfig("powermanagementprofilesrc", KConfig::SimpleConfig | KConfig::CascadeConfig)}
{ {
@ -58,8 +58,6 @@ MobilePower::MobilePower(QObject *parent, const KPluginMetaData &metaData, const
load(); load();
} }
MobilePower::~MobilePower() = default;
// contents of powermanagementprofilesrc // contents of powermanagementprofilesrc
// //
// [Battery][SuspendSession] // our LockScreen // [Battery][SuspendSession] // our LockScreen

View file

@ -18,8 +18,7 @@ class MobilePower : public KQuickConfigModule
Q_PROPERTY(int suspendSessionIdx READ suspendSessionIdx WRITE setSuspendSessionIdx NOTIFY suspendSessionIdxChanged) Q_PROPERTY(int suspendSessionIdx READ suspendSessionIdx WRITE setSuspendSessionIdx NOTIFY suspendSessionIdxChanged)
public: public:
MobilePower(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); MobilePower(QObject *parent, const KPluginMetaData &metaData);
~MobilePower();
Q_INVOKABLE QStringList timeOptions() const; Q_INVOKABLE QStringList timeOptions() const;

View file

@ -31,10 +31,10 @@
#define FORMAT24H "HH:mm:ss" #define FORMAT24H "HH:mm:ss"
#define FORMAT12H "h:mm:ss ap" #define FORMAT12H "h:mm:ss ap"
K_PLUGIN_FACTORY_WITH_JSON(TimeSettingsFactory, "kcm_mobile_time.json", registerPlugin<TimeSettings>();) K_PLUGIN_CLASS_WITH_JSON(TimeSettings, "kcm_mobile_time.json")
TimeSettings::TimeSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) TimeSettings::TimeSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
, m_useNtp(true) , m_useNtp(true)
{ {
qDebug() << "time settings init"; qDebug() << "time settings init";
@ -51,10 +51,6 @@ TimeSettings::TimeSettings(QObject *parent, const KPluginMetaData &metaData, con
qDebug() << "TimeSettings module loaded."; qDebug() << "TimeSettings module loaded.";
} }
TimeSettings::~TimeSettings()
{
}
void TimeSettings::initTimeZones() void TimeSettings::initTimeZones()
{ {
auto *filterModel = new TimeZoneFilterProxy(this); auto *filterModel = new TimeZoneFilterProxy(this);

View file

@ -48,14 +48,7 @@ class TimeSettings : public KQuickConfigModule
Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged) Q_PROPERTY(QString errorString READ errorString NOTIFY errorStringChanged)
public: public:
/** TimeSettings(QObject *parent, const KPluginMetaData &metaData);
* @name Settings Module Constructor
*
* @arg parent The parent object
* @arg list Arguments, currently unused
*/
TimeSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args);
~TimeSettings() override;
QString currentTimeText(); QString currentTimeText();
QTime currentTime() const; QTime currentTime() const;

View file

@ -28,8 +28,8 @@
K_PLUGIN_CLASS_WITH_JSON(VirtualKeyboard, "kcm_mobile_onscreenkeyboard.json") K_PLUGIN_CLASS_WITH_JSON(VirtualKeyboard, "kcm_mobile_onscreenkeyboard.json")
VirtualKeyboard::VirtualKeyboard(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) VirtualKeyboard::VirtualKeyboard(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
, m_gsettings(new GSettingsItem("/org/maliit/keyboard/maliit/", parent)) , m_gsettings(new GSettingsItem("/org/maliit/keyboard/maliit/", parent))
, m_langModel(new LanguageModel(this, m_gsettings)) , m_langModel(new LanguageModel(this, m_gsettings))
{ {

View file

@ -28,7 +28,7 @@ class VirtualKeyboard : public KQuickConfigModule
Q_PROPERTY(bool vibrateFeedback MEMBER m_vibrateFeedback WRITE setVibrateFeedback NOTIFY vibrateFeedbackChanged) Q_PROPERTY(bool vibrateFeedback MEMBER m_vibrateFeedback WRITE setVibrateFeedback NOTIFY vibrateFeedbackChanged)
public: public:
VirtualKeyboard(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); VirtualKeyboard(QObject *parent, const KPluginMetaData &metaData);
void setSpellCheck(bool enabled); void setSpellCheck(bool enabled);
void setAutoCapitalize(bool enabled); void setAutoCapitalize(bool enabled);

View file

@ -25,12 +25,8 @@
K_PLUGIN_CLASS_WITH_JSON(WifiSettings, "kcm_mobile_wifi.json") K_PLUGIN_CLASS_WITH_JSON(WifiSettings, "kcm_mobile_wifi.json")
WifiSettings::WifiSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args) WifiSettings::WifiSettings(QObject *parent, const KPluginMetaData &metaData)
: KQuickConfigModule(parent, metaData, args) : KQuickConfigModule(parent, metaData)
{
}
WifiSettings::~WifiSettings()
{ {
} }

View file

@ -13,14 +13,13 @@ class WifiSettings : public KQuickConfigModule
{ {
Q_OBJECT Q_OBJECT
public: public:
WifiSettings(QObject *parent, const KPluginMetaData &metaData, const QVariantList &args); WifiSettings(QObject *parent, const KPluginMetaData &metaData);
Q_INVOKABLE QVariantMap getConnectionSettings(const QString &connection, const QString &type); Q_INVOKABLE QVariantMap getConnectionSettings(const QString &connection, const QString &type);
Q_INVOKABLE QVariantMap getActiveConnectionInfo(const QString &connection); Q_INVOKABLE QVariantMap getActiveConnectionInfo(const QString &connection);
Q_INVOKABLE void addConnectionFromQML(const QVariantMap &QMLmap); Q_INVOKABLE void addConnectionFromQML(const QVariantMap &QMLmap);
Q_INVOKABLE void updateConnectionFromQML(const QString &path, const QVariantMap &map); Q_INVOKABLE void updateConnectionFromQML(const QString &path, const QVariantMap &map);
Q_INVOKABLE QString getAccessPointDevice(); Q_INVOKABLE QString getAccessPointDevice();
Q_INVOKABLE QString getAccessPointConnection(); Q_INVOKABLE QString getAccessPointConnection();
virtual ~WifiSettings();
}; };
#endif // WIFISETTINGS_H #endif // WIFISETTINGS_H