X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7056356c2eae28d3a5513157ba4d34609cd7d45f..76e3eab6ea3545339da2fd30b838acbc8c0ff607:/src/settings/kcm/kcmdolphingeneral.cpp diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp index 25e3b6876..417979d23 100644 --- a/src/settings/kcm/kcmdolphingeneral.cpp +++ b/src/settings/kcm/kcmdolphingeneral.cpp @@ -19,16 +19,17 @@ 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(parent), data) , m_pages() { setButtons(KCModule::Default | KCModule::Help | KCModule::Apply); - QVBoxLayout *topLayout = new QVBoxLayout(this); + const auto parentWidget = qobject_cast(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);