From: Alexander Lohnau Date: Thu, 11 Nov 2021 19:51:00 +0000 (+0100) Subject: Port deprecated QLayout::margin call X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/f1756dd1413fa602f536e057087583be2ddbd2b2 Port deprecated QLayout::margin call 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; } } ``` --- diff --git a/src/views/tooltips/dolphinfilemetadatawidget.cpp b/src/views/tooltips/dolphinfilemetadatawidget.cpp index b147135bf..e914593fb 100644 --- a/src/views/tooltips/dolphinfilemetadatawidget.cpp +++ b/src/views/tooltips/dolphinfilemetadatawidget.cpp @@ -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); }