Fix bogus setAttribute setter warning
Since e9e16c7464
running webengine application you can get
warning "Attribute Qt::AA_ShareOpenGLContexts must be set before
QCoreApplication is created."
WebEngine set shared open gl context on qt_call_pre_routines, so
when QCoreApplicationPrivate init() runs.
Fixes: QTBUG-76391
Change-Id: I5fc146ed70054b0c1597fe06615cea2d7a8969d8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
parent
f344b6357e
commit
b68a9df076
@ -979,7 +979,11 @@ void QCoreApplication::setAttribute(Qt::ApplicationAttribute attribute, bool on)
|
|||||||
QCoreApplicationPrivate::attribs |= 1 << attribute;
|
QCoreApplicationPrivate::attribs |= 1 << attribute;
|
||||||
else
|
else
|
||||||
QCoreApplicationPrivate::attribs &= ~(1 << attribute);
|
QCoreApplicationPrivate::attribs &= ~(1 << attribute);
|
||||||
|
#if defined(QT_NO_QOBJECT)
|
||||||
if (Q_UNLIKELY(qApp)) {
|
if (Q_UNLIKELY(qApp)) {
|
||||||
|
#else
|
||||||
|
if (Q_UNLIKELY(QCoreApplicationPrivate::is_app_running)) {
|
||||||
|
#endif
|
||||||
switch (attribute) {
|
switch (attribute) {
|
||||||
case Qt::AA_EnableHighDpiScaling:
|
case Qt::AA_EnableHighDpiScaling:
|
||||||
case Qt::AA_DisableHighDpiScaling:
|
case Qt::AA_DisableHighDpiScaling:
|
||||||
|
Loading…
Reference in New Issue
Block a user