]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Port deprecated QLayout::margin call
authorAlexander Lohnau <alexander.lohnau@gmx.de>
Thu, 11 Nov 2021 19:51:00 +0000 (20:51 +0100)
committerAlexander Lohnau <alexander.lohnau@gmx.de>
Wed, 1 Dec 2021 22:10:58 +0000 (22:10 +0000)
As the method impl suggests, the left value is preferred if all the values are the same.
This is the case for the given layout.

```cpp
int QLayout::margin() const
{
    int left, top, right, bottom;
    getContentsMargins(&left, &top, &right, &bottom);
    if (left == top && top == right && right == bottom) {
        return left;
    } else {
        return -1;
    }
}
```

src/views/tooltips/dolphinfilemetadatawidget.cpp

index b147135bfdc59ced81ef960574b068bfaaa809fc..e914593fb5f9898e1096403c6b20bcd49a275a36 100644 (file)
@@ -66,7 +66,7 @@ DolphinFileMetaDataWidget::DolphinFileMetaDataWidget(QWidget* parent) :
 
     QHBoxLayout* layout = new QHBoxLayout(this);
     layout->addWidget(m_preview);
-    layout->addSpacing(layout->margin());
+    layout->addSpacing(layout->contentsMargins().left());
     layout->addLayout(textLayout);
 }