X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5593c252e8d9638c86dcc2bb9edd394ea14f8ba1..d1a70c0b629b:/src/settings/trash/trashsettingspage.cpp diff --git a/src/settings/trash/trashsettingspage.cpp b/src/settings/trash/trashsettingspage.cpp index 4c71aa3ec..dd6038fb6 100644 --- a/src/settings/trash/trashsettingspage.cpp +++ b/src/settings/trash/trashsettingspage.cpp @@ -21,30 +21,19 @@ #include -#include +#include TrashSettingsPage::TrashSettingsPage(QWidget* parent) : SettingsPageBase(parent) { - QVBoxLayout* topLayout = new QVBoxLayout(this); - QWidget* vBox = new QWidget(this); - QVBoxLayout *vBoxVBoxLayout = new QVBoxLayout(vBox); - vBoxVBoxLayout->setMargin(0); + QFormLayout* topLayout = new QFormLayout(this); m_proxy = new KCModuleProxy(QStringLiteral("kcmtrash")); - 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. - QWidget *w = new QWidget(vBox); - vBoxVBoxLayout->addWidget(w); - - topLayout->addWidget(vBox); + topLayout->addRow(m_proxy); loadSettings(); - connect(m_proxy, static_cast(&KCModuleProxy::changed), this, &TrashSettingsPage::changed); + connect(m_proxy, QOverload::of(&KCModuleProxy::changed), this, &TrashSettingsPage::changed); } TrashSettingsPage::~TrashSettingsPage()