From: Elvis Angelaccio Date: Fri, 21 Jul 2017 10:09:17 +0000 (+0200) Subject: Fix layout warning X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/9f86b5a266ff546ae4962a1e1e95a5a444d868e8?ds=inline Fix layout warning This fixes the following warning: QLayout: Attempting to add QLayout "" to PreviewsSettingsPage "", which already has a layout `topLayout->addLayout(fileSizeBoxLayout)` takes ownership of `fileSizeBoxLayout`, so there is no reason to use `this` as parent. --- diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index f01d220dd..1a92cd16c 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -81,7 +81,7 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : m_remoteFileSizeBox->setSuffix(QStringLiteral(" MB")); m_remoteFileSizeBox->setRange(0, 9999999); /* MB */ - QHBoxLayout* fileSizeBoxLayout = new QHBoxLayout(this); + QHBoxLayout* fileSizeBoxLayout = new QHBoxLayout(); fileSizeBoxLayout->addWidget(remoteFileSizeLabel, 0, Qt::AlignRight); fileSizeBoxLayout->addWidget(m_remoteFileSizeBox);