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);