Commit f8cf4570 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve folder settings plugins

parent 0da4fa3e
Pipeline #27872 failed with stage
in 78 minutes
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include "folderconfiguresettingsdialog.h" #include "folderconfiguresettingsdialog.h"
#include "folderconfiguresettingswidget.h"
#include <KConfigGroup> #include <KConfigGroup>
#include <KSharedConfig> #include <KSharedConfig>
#include <KLocalizedString> #include <KLocalizedString>
...@@ -33,8 +34,11 @@ FolderConfigureSettingsDialog::FolderConfigureSettingsDialog(QWidget *parent) ...@@ -33,8 +34,11 @@ FolderConfigureSettingsDialog::FolderConfigureSettingsDialog(QWidget *parent)
{ {
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout")); mainLayout->setObjectName(QStringLiteral("mainLayout"));
setWindowTitle(i18nc("@title:window", "Configure Expiry Account Trash Folder")); setWindowTitle(i18nc("@title:window", "Configure Folder Settings"));
mFolderConfigureSettingsWidget = new FolderConfigureSettingsWidget(this);
mFolderConfigureSettingsWidget->setObjectName(QStringLiteral("mFolderConfigureSettingsWidget"));
mainLayout->addWidget(mFolderConfigureSettingsWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok, this); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok, this);
buttonBox->setObjectName(QStringLiteral("buttonbox")); buttonBox->setObjectName(QStringLiteral("buttonbox"));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define FOLDERCONFIGURESETTINGSDIALOG_H #define FOLDERCONFIGURESETTINGSDIALOG_H
#include <QDialog> #include <QDialog>
class FolderConfigureSettingsWidget;
class FolderConfigureSettingsDialog : public QDialog class FolderConfigureSettingsDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
...@@ -32,6 +32,7 @@ public: ...@@ -32,6 +32,7 @@ public:
private: private:
void readConfig(); void readConfig();
void writeConfig(); void writeConfig();
FolderConfigureSettingsWidget *mFolderConfigureSettingsWidget = nullptr;
}; };
#endif // FOLDERCONFIGURESETTINGSDIALOG_H #endif // FOLDERCONFIGURESETTINGSDIALOG_H
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include "folderconfiguresettingsplugin.h" #include "folderconfiguresettingsplugin.h"
#include "folderconfiguresettingsdialog.h"
#include <KPluginFactory> #include <KPluginFactory>
#include <QPointer> #include <QPointer>
...@@ -34,9 +35,9 @@ FolderConfigureSettingsPlugin::~FolderConfigureSettingsPlugin() ...@@ -34,9 +35,9 @@ FolderConfigureSettingsPlugin::~FolderConfigureSettingsPlugin()
void FolderConfigureSettingsPlugin::showConfigureDialog(QWidget *parent) void FolderConfigureSettingsPlugin::showConfigureDialog(QWidget *parent)
{ {
// QPointer<FolderConfigureSettingsDialog> dlg = new FolderConfigureSettingsDialog(parent); QPointer<FolderConfigureSettingsDialog> dlg = new FolderConfigureSettingsDialog(parent);
// dlg->exec(); dlg->exec();
// delete dlg; delete dlg;
} }
#include "folderconfiguresettingsplugin.moc" #include "folderconfiguresettingsplugin.moc"
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