diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-09 14:41:46 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-13 05:55:36 +0000 |
commit | 3c907d0f4a0bbd4f2d4116d9bb0929c51f7cc905 (patch) | |
tree | 6a3e1432b1c2841d3025342d80bffd29a330cbe5 /src/widgets/dialogs/qcolordialog.cpp | |
parent | 7c254024f32ab783385718dea08829c5e0c82408 (diff) |
Replace QWidget::margin() with QWidget::contentsMargins()
Replace deprecated QWidget::margin/setMargin() calls with
contentsMargin/setContentsMargins().
Change-Id: I7fe8056196d73d1be97446d40a438cd0b1a13817
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 722aa3e278..c0bacd553d 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1179,7 +1179,8 @@ QColorShower::QColorShower(QColorDialog *parent) curQColor = Qt::white; gl = new QGridLayout(this); - gl->setMargin(gl->spacing()); + const int s = gl->spacing(); + gl->setContentsMargins(s, s, s, s); lab = new QColorShowLabel(this); #ifdef QT_SMALL_COLORDIALOG @@ -1807,7 +1808,7 @@ void QColorDialogPrivate::initWidgets() rightLay->addStretch(); cs = new QColorShower(q); - pickLay->setMargin(cs->gl->margin()); + pickLay->setContentsMargins(cs->gl->contentsMargins()); QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb))); QObject::connect(cs, SIGNAL(currentColorChanged(QColor)), q, SIGNAL(currentColorChanged(QColor))); @@ -1816,7 +1817,7 @@ void QColorDialogPrivate::initWidgets() #else rightLay->addWidget(cs); if (leftLay) - leftLay->addSpacing(cs->gl->margin()); + leftLay->addSpacing(cs->gl->contentsMargins().right()); #endif buttons = new QDialogButtonBox(q); |