]> git.lyx.org Git - features.git/commit
Fix Qt deprecation warn for getContentsMargins()
authorScott Kostyshak <skostysh@lyx.org>
Fri, 6 Mar 2020 14:07:31 +0000 (09:07 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 6 Mar 2020 14:37:43 +0000 (09:37 -0500)
commit1c78b563ff47cafbd2c1622342ca3c639e4738ca
tree5e47ddbb100602c81ffc63e158ecf9b66f955f83
parent339424ce0083693cb274a042d2460cec77104ff1
Fix Qt deprecation warn for getContentsMargins()

Fixes the following warning:

  error: ‘void QWidget::getContentsMargins(int*, int*, int*, int*) const’ is deprecated: use contentsMargins() [-Werror=deprecated-declarations]

The new code also has advantages in that 'l' can be set to const and
it is more readable because it is clear that only 'l' is used.

QWidget::getContentsMargins() was deprecated in 5.14.0 [1]. and
QWidget::contentsMargins() is available since 4.6 [2].

[1] https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.14.0/?h=v5.14.0
[2] https://doc.qt.io/archives/qt-4.8/qlayout.html#contentsMargins
src/frontends/qt/GuiView.cpp