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