]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix layout warning
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Fri, 21 Jul 2017 10:09:17 +0000 (12:09 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Fri, 21 Jul 2017 10:09:17 +0000 (12:09 +0200)
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.

src/settings/general/previewssettingspage.cpp

index f01d220dda50d9d0519eb6cdec312e87d31e639c..1a92cd16c30380a5da9fe112b5e258f6b9c0a955 100644 (file)
@@ -81,7 +81,7 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
     m_remoteFileSizeBox->setSuffix(QStringLiteral(" MB"));
     m_remoteFileSizeBox->setRange(0, 9999999); /* MB */
 
     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);
 
     fileSizeBoxLayout->addWidget(remoteFileSizeLabel, 0, Qt::AlignRight);
     fileSizeBoxLayout->addWidget(m_remoteFileSizeBox);