summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsscene.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-19 11:52:07 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-25 17:59:10 +0200
commitb77a3f47c9d6f4fd68a687e3bdb38e550d2810ad (patch)
tree0849ece35646b7847218a54005ff512ae25eda5d /src/widgets/graphicsview/qgraphicsscene.cpp
parentc0d0949448c5a75d50ca189974d4d9f48133aea8 (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/qgraphicsscene.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index 1e47885bc7..545b7c6c9b 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -1532,7 +1532,7 @@ void QGraphicsScenePrivate::ensureSequentialTopLevelSiblingIndexes()
*/
void QGraphicsScenePrivate::setFont_helper(const QFont &font)
{
- if (this->font == font && this->font.resolve() == font.resolve())
+ if (this->font == font && this->font.resolveMask() == font.resolveMask())
return;
updateFont(font);
}
@@ -1546,7 +1546,7 @@ void QGraphicsScenePrivate::setFont_helper(const QFont &font)
void QGraphicsScenePrivate::resolveFont()
{
QFont naturalFont = QApplication::font();
- naturalFont.resolve(0);
+ naturalFont.setResolveMask(0);
QFont resolvedFont = font.resolve(naturalFont);
updateFont(resolvedFont);
}
@@ -1572,7 +1572,7 @@ void QGraphicsScenePrivate::updateFont(const QFont &font)
// Resolvefont for an item is a noop operation, but
// every item can be a widget, or can have a widget
// childre.
- item->d_ptr->resolveFont(font.resolve());
+ item->d_ptr->resolveFont(font.resolveMask());
}
}
@@ -1589,7 +1589,7 @@ void QGraphicsScenePrivate::updateFont(const QFont &font)
*/
void QGraphicsScenePrivate::setPalette_helper(const QPalette &palette)
{
- if (this->palette == palette && this->palette.resolve() == palette.resolve())
+ if (this->palette == palette && this->palette.resolveMask() == palette.resolveMask())
return;
updatePalette(palette);
}
@@ -1603,7 +1603,7 @@ void QGraphicsScenePrivate::setPalette_helper(const QPalette &palette)
void QGraphicsScenePrivate::resolvePalette()
{
QPalette naturalPalette = QGuiApplication::palette();
- naturalPalette.resolve(0);
+ naturalPalette.setResolveMask(0);
QPalette resolvedPalette = palette.resolve(naturalPalette);
updatePalette(resolvedPalette);
}
@@ -1629,7 +1629,7 @@ void QGraphicsScenePrivate::updatePalette(const QPalette &palette)
// ResolvePalette for an item is a noop operation, but
// every item can be a widget, or can have a widget
// children.
- item->d_ptr->resolvePalette(palette.resolve());
+ item->d_ptr->resolvePalette(palette.resolveMask());
}
}
@@ -2548,8 +2548,8 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
addItem(child);
// Resolve font and palette.
- item->d_ptr->resolveFont(d->font.resolve());
- item->d_ptr->resolvePalette(d->palette.resolve());
+ item->d_ptr->resolveFont(d->font.resolveMask());
+ item->d_ptr->resolvePalette(d->palette.resolveMask());
// Reenable selectionChanged() for individual items
@@ -5562,7 +5562,7 @@ void QGraphicsScene::setFont(const QFont &font)
{
Q_D(QGraphicsScene);
QFont naturalFont = QApplication::font();
- naturalFont.resolve(0);
+ naturalFont.setResolveMask(0);
QFont resolvedFont = font.resolve(naturalFont);
d->setFont_helper(resolvedFont);
}
@@ -5599,7 +5599,7 @@ void QGraphicsScene::setPalette(const QPalette &palette)
{
Q_D(QGraphicsScene);
QPalette naturalPalette = QGuiApplication::palette();
- naturalPalette.resolve(0);
+ naturalPalette.setResolveMask(0);
QPalette resolvedPalette = palette.resolve(naturalPalette);
d->setPalette_helper(resolvedPalette);
}