]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/kcm/kcmdolphingeneral.cpp
Two clicks on file/folder to rename
[dolphin.git] / src / settings / kcm / kcmdolphingeneral.cpp
index 68f515ac32120dc5ac4f8cda2ad7d22489aa3607..f5ac4cd55651547a42720144219d39d6a5b2a3ba 100644 (file)
@@ -19,8 +19,6 @@
 
 #include "kcmdolphingeneral.h"
 
-#include <KTabWidget>
-#include <KDialog>
 #include <KLocalizedString>
 #include <KPluginFactory>
 #include <KPluginLoader>
@@ -31,9 +29,9 @@
 
 #include <QDir>
 #include <QVBoxLayout>
+#include <QTabWidget>
 
-K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin<DolphinGeneralConfigModule>("dolphingeneral");)
-K_EXPORT_PLUGIN(KCMDolphinGeneralConfigFactory("kcmdolphingeneral"))
+K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin<DolphinGeneralConfigModule>(QStringLiteral("dolphingeneral"));)
 
 DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QVariantList& args) :
     KCModule(parent),
@@ -41,19 +39,15 @@ DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QV
 {
     Q_UNUSED(args);
 
-    //KF5 port: remove this line and define TRANSLATION_DOMAIN in CMakeLists.txt instead
-//KLocale::global()->insertCatalog("dolphin");
-
     setButtons(KCModule::Default | KCModule::Help);
 
     QVBoxLayout* topLayout = new QVBoxLayout(this);
     topLayout->setMargin(0);
-    topLayout->setSpacing(KDialog::spacingHint());
 
-    KTabWidget* tabWidget = new KTabWidget(this);
+    QTabWidget* tabWidget = new QTabWidget(this);
 
     // initialize 'Behavior' tab
-    BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(QDir::homePath(), tabWidget);
+    BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(QUrl::fromLocalFile(QDir::homePath()), tabWidget);
     tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior"));
     connect(behaviorPage, &BehaviorSettingsPage::changed, this, static_cast<void(DolphinGeneralConfigModule::*)()>(&DolphinGeneralConfigModule::changed));