Remove clearWidgetPaletteHash argument from setPalette_helper
The argument is only used when the application palette is set, (as opposed to setting the palette for a specific widget class), and that code path is only triggered from QApplication::setPalette, which passes 'true' for this argument. Change-Id: I67a1cc3741f6f62653b0f95ff88d28228f9977d4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
2a02487ff0
commit
7b092b3fe3
@ -633,7 +633,7 @@ static void setPossiblePalette(const QPalette *palette, const char *className)
|
||||
{
|
||||
if (palette == 0)
|
||||
return;
|
||||
QApplicationPrivate::setPalette_helper(*palette, className, false);
|
||||
QApplicationPrivate::setPalette_helper(*palette, className);
|
||||
}
|
||||
|
||||
void QApplicationPrivate::initializeWidgetPaletteHash()
|
||||
@ -1363,7 +1363,7 @@ QPalette QApplication::palette(const char *className)
|
||||
return QGuiApplication::palette();
|
||||
}
|
||||
|
||||
void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash)
|
||||
void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className)
|
||||
{
|
||||
QPalette pal = palette;
|
||||
|
||||
@ -1380,7 +1380,6 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
||||
|
||||
if (!widgetPalettes.isEmpty()) {
|
||||
all = true;
|
||||
if (clearWidgetPaletteHash)
|
||||
widgetPalettes.clear();
|
||||
}
|
||||
} else {
|
||||
@ -1416,7 +1415,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
||||
|
||||
void QApplication::setPalette(const QPalette &palette, const char* className)
|
||||
{
|
||||
QApplicationPrivate::setPalette_helper(palette, className, /*clearWidgetPaletteHash=*/ true);
|
||||
QApplicationPrivate::setPalette_helper(palette, className);
|
||||
}
|
||||
|
||||
|
||||
|
@ -185,7 +185,7 @@ public:
|
||||
static bool widgetCount; // Coupled with -widgetcount switch
|
||||
|
||||
static void setSystemPalette(const QPalette &pal);
|
||||
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
|
||||
static void setPalette_helper(const QPalette &palette, const char* className);
|
||||
static void initializeWidgetPaletteHash();
|
||||
static void initializeWidgetFontHash();
|
||||
static void setSystemFont(const QFont &font);
|
||||
|
Loading…
Reference in New Issue
Block a user