]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/kcm/kcmdolphingeneral.cpp
Port to Qt6
[dolphin.git] / src / settings / kcm / kcmdolphingeneral.cpp
index 25e3b6876d8d9582c04d6162f8777762c784c4d2..417979d234d868c8e8f476dbbb1d402957130ae9 100644 (file)
 
 K_PLUGIN_CLASS_WITH_JSON(DolphinGeneralConfigModule, "kcmdolphingeneral.json")
 
-DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args)
-    : KCModule(parent, args)
+DolphinGeneralConfigModule::DolphinGeneralConfigModule(QObject *parent, const KPluginMetaData &data)
+    : KCModule(qobject_cast<QWidget *>(parent), data)
     , m_pages()
 {
     setButtons(KCModule::Default | KCModule::Help | KCModule::Apply);
 
-    QVBoxLayout *topLayout = new QVBoxLayout(this);
+    const auto parentWidget = qobject_cast<QWidget *>(parent);
+    QVBoxLayout *topLayout = new QVBoxLayout(parentWidget);
     topLayout->setContentsMargins(0, 0, 0, 0);
 
-    QTabWidget *tabWidget = new QTabWidget(this);
+    QTabWidget *tabWidget = new QTabWidget(parentWidget);
 
     // initialize 'Behavior' tab
     BehaviorSettingsPage *behaviorPage = new BehaviorSettingsPage(QUrl::fromLocalFile(QDir::homePath()), tabWidget);