#include "trashsettingspage.h"
#include <KCModuleProxy>
-#include <kdialog.h>
-#include <kvbox.h>
-#include <settings/dolphinsettings.h>
-
-#include <QVBoxLayout>
+#include <QFormLayout>
TrashSettingsPage::TrashSettingsPage(QWidget* parent) :
SettingsPageBase(parent)
{
- const int spacing = KDialog::spacingHint();
-
- QVBoxLayout* topLayout = new QVBoxLayout(this);
- KVBox* vBox = new KVBox(this);
- vBox->setSpacing(spacing);
+ QFormLayout* topLayout = new QFormLayout(this);
- m_proxy = new KCModuleProxy("kcmtrash");
- connect(m_proxy, SIGNAL(changed(bool)), this, SIGNAL(changed()));
- topLayout->addWidget(m_proxy);
-
- // Add a dummy widget with no restriction regarding
- // a vertical resizing. This assures that the dialog layout
- // is not stretched vertically.
- new QWidget(vBox);
- topLayout->addWidget(vBox);
+ m_proxy = new KCModuleProxy(QStringLiteral("kcmtrash"));
+ topLayout->addRow(m_proxy);
loadSettings();
+
+ connect(m_proxy, QOverload<bool>::of(&KCModuleProxy::changed), this, &TrashSettingsPage::changed);
}
TrashSettingsPage::~TrashSettingsPage()
m_proxy->load();
}
-#include "trashsettingspage.moc"