diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-08-19 11:52:07 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-08-25 17:59:10 +0200 |
commit | b77a3f47c9d6f4fd68a687e3bdb38e550d2810ad (patch) | |
tree | 0849ece35646b7847218a54005ff512ae25eda5d /src/widgets/graphicsview/qgraphicswidget.cpp | |
parent | c0d0949448c5a75d50ca189974d4d9f48133aea8 (diff) |
Rename confusingly named QFont/QPalette::resolve overloads
Having three methods with the same name doing different things is
unnecessarily confusing, so follow the standard naming convention in
Qt and call the getter of the resolve mask resolveMask, and the setter
setResolveMask. These methods were all documented as internal.
The publicly documented resolve() method that merges two fonts and
palettes based on the respective masks remains as it is, even though
'merge' would perhaps be a better name.
Change-Id: If90b1ad800834baccd1dbc38fc6b861540d6df6e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicswidget.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicswidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp index 530f7aee7a..fea9e18b9c 100644 --- a/src/widgets/graphicsview/qgraphicswidget.cpp +++ b/src/widgets/graphicsview/qgraphicswidget.cpp @@ -977,13 +977,13 @@ QFont QGraphicsWidget::font() const { Q_D(const QGraphicsWidget); QFont fnt = d->font; - fnt.resolve(fnt.resolve() | d->inheritedFontResolveMask); + fnt.setResolveMask(fnt.resolveMask() | d->inheritedFontResolveMask); return fnt; } void QGraphicsWidget::setFont(const QFont &font) { Q_D(QGraphicsWidget); - setAttribute(Qt::WA_SetFont, font.resolve() != 0); + setAttribute(Qt::WA_SetFont, font.resolveMask() != 0); QFont naturalFont = d->naturalWidgetFont(); QFont resolvedFont = font.resolve(naturalFont); @@ -1023,7 +1023,7 @@ QPalette QGraphicsWidget::palette() const void QGraphicsWidget::setPalette(const QPalette &palette) { Q_D(QGraphicsWidget); - setAttribute(Qt::WA_SetPalette, palette.resolve() != 0); + setAttribute(Qt::WA_SetPalette, palette.resolveMask() != 0); QPalette naturalPalette = d->naturalWidgetPalette(); QPalette resolvedPalette = palette.resolve(naturalPalette); |