diff options
| author | Ahmad Samir <[email protected]> | 2020-12-03 20:06:11 +0200 |
|---|---|---|
| committer | Ahmad Samir <[email protected]> | 2020-12-03 19:50:04 +0000 |
| commit | 1d64b9bb10e90a0c6a1053a3a41614caf0e0f8e4 (patch) | |
| tree | 604d650c815330b50d1193c65f82a6777ad7c3ed /src/settings/viewpropertiesdialog.cpp | |
| parent | 134464177513cba0bb5e2f64875688f70e9a622b (diff) | |
DolphinView: set the parent of layout in the ctor
This silences a runtime warning:
QLayout: Attempting to add QLayout "" to DolphinView "", which already
has a layout
Remove redudant setLayout() calls, passing a parent widget to the
Q*BoxLayout ctor sets that layout as the top-level layout for that widget.
Diffstat (limited to 'src/settings/viewpropertiesdialog.cpp')
| -rw-r--r-- | src/settings/viewpropertiesdialog.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index c6dbc82b4..2bf317440 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -64,7 +64,6 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : auto layout = new QFormLayout(this); // Otherwise the dialog won't resize when we collapse the KCollapsibleGroupBox. layout->setSizeConstraint(QLayout::SetFixedSize); - setLayout(layout); // create 'Properties' group containing view mode, sorting, sort order and show hidden files m_viewMode = new QComboBox(); @@ -89,7 +88,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : auto additionalInfoBox = new KCollapsibleGroupBox(); additionalInfoBox->setTitle(i18nc("@title:group", "Additional Information")); - auto innerLayout = new QVBoxLayout(); + auto innerLayout = new QVBoxLayout(additionalInfoBox); { QList<QByteArray> visibleRoles = m_viewProps->visibleRoles(); @@ -133,8 +132,6 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : innerLayout->addWidget(m_listWidget); } - additionalInfoBox->setLayout(innerLayout); - QHBoxLayout* sortingLayout = new QHBoxLayout(); sortingLayout->setContentsMargins(0, 0, 0, 0); sortingLayout->addWidget(m_sortOrder); |
