Verified Commit ae6d5f48 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port away from deprecated create_* KCM loading

Task: https://phabricator.kde.org/T13808
parent 58163e72
...@@ -94,7 +94,7 @@ ecm_qt_declare_logging_category(kcm_kdf_PART_SRCS ...@@ -94,7 +94,7 @@ ecm_qt_declare_logging_category(kcm_kdf_PART_SRCS
CATEGORY_NAME kdf.kcm DESCRIPTION "kdf (kdf kcm)" EXPORT KDF) CATEGORY_NAME kdf.kcm DESCRIPTION "kdf (kdf kcm)" EXPORT KDF)
add_library(kcm_kdf ${kcm_kdf_PART_SRCS}) add_library(kcm_kdf ${kcm_kdf_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_kdf "../desktop/kcmdf.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_kdf target_link_libraries(kcm_kdf
kdfprivate kdfprivate
Qt5::Core Qt5::Core
......
...@@ -28,9 +28,13 @@ ...@@ -28,9 +28,13 @@
#include "kcmdf.h" #include "kcmdf.h"
#include <QVBoxLayout> #include <QVBoxLayout>
#include <KPluginFactory>
#include <kpluginfactory.h>
KDiskFreeWidget::KDiskFreeWidget( QWidget *parent ) K_PLUGIN_CLASS_WITH_JSON(KDiskFreeWidget, "kcmdf.json")
: KCModule( parent )
KDiskFreeWidget::KDiskFreeWidget( QWidget *parent, const QVariantList &args )
: KCModule( parent, args )
{ {
setButtons(Help); setButtons(Help);
...@@ -52,11 +56,4 @@ QString KDiskFreeWidget::quickHelp() const ...@@ -52,11 +56,4 @@ QString KDiskFreeWidget::quickHelp() const
" or to open it in the file manager."); " or to open it in the file manager.");
} }
extern "C" #include "kcmdf.moc"
{
Q_DECL_EXPORT KCModule* create_kdf( QWidget *parent, const char * /*name*/ )
{
return new KDiskFreeWidget( parent );
}
}
...@@ -34,7 +34,7 @@ class KDiskFreeWidget : public KCModule ...@@ -34,7 +34,7 @@ class KDiskFreeWidget : public KCModule
Q_OBJECT Q_OBJECT
public: public:
explicit KDiskFreeWidget( QWidget *parent = nullptr ); explicit KDiskFreeWidget( QWidget *parent = nullptr, const QVariantList &args = {});
~KDiskFreeWidget() override; ~KDiskFreeWidget() override;
QString quickHelp() const override; QString quickHelp() const override;
......
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