summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.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/gui/kernel/qguiapplication.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/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index d6926e7515..648b128ffd 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3368,10 +3368,10 @@ bool QGuiApplicationPrivate::setPalette(const QPalette &palette)
// Resolve the palette against the theme palette, filling in
// any missing roles, while keeping the original resolve mask.
QPalette basePalette = qGuiApp ? qGuiApp->d_func()->basePalette() : Qt::gray;
- basePalette.resolve(0); // The base palette only contributes missing colors roles
+ basePalette.setResolveMask(0); // The base palette only contributes missing colors roles
QPalette resolvedPalette = palette.resolve(basePalette);
- if (app_pal && resolvedPalette == *app_pal && resolvedPalette.resolve() == app_pal->resolve())
+ if (app_pal && resolvedPalette == *app_pal && resolvedPalette.resolveMask() == app_pal->resolveMask())
return false;
if (!app_pal)
@@ -3379,7 +3379,7 @@ bool QGuiApplicationPrivate::setPalette(const QPalette &palette)
else
*app_pal = resolvedPalette;
- QCoreApplication::setAttribute(Qt::AA_SetPalette, app_pal->resolve() != 0);
+ QCoreApplication::setAttribute(Qt::AA_SetPalette, app_pal->resolveMask() != 0);
return true;
}