Contain Qt::AA_SetPalette logic in QApplicationPrivate::setPalette_helper
Change-Id: I88b36e800139389895ecb1a15553207a24b3e3a4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
c7ecff0460
commit
761025d08c
@ -1380,6 +1380,10 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
|||||||
QApplicationPrivate::app_pal = new QPalette(pal);
|
QApplicationPrivate::app_pal = new QPalette(pal);
|
||||||
else
|
else
|
||||||
*QApplicationPrivate::app_pal = pal;
|
*QApplicationPrivate::app_pal = pal;
|
||||||
|
|
||||||
|
if (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal))
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_SetPalette);
|
||||||
|
|
||||||
if (hash && hash->size()) {
|
if (hash && hash->size()) {
|
||||||
all = true;
|
all = true;
|
||||||
if (clearWidgetPaletteHash)
|
if (clearWidgetPaletteHash)
|
||||||
@ -1389,9 +1393,6 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
|||||||
hash->insert(className, pal);
|
hash->insert(className, pal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!className && (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal)))
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_SetPalette);
|
|
||||||
|
|
||||||
if (qApp)
|
if (qApp)
|
||||||
qApp->d_func()->sendApplicationPaletteChange(all, className);
|
qApp->d_func()->sendApplicationPaletteChange(all, className);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user