QGuiApplication: fix QString comparison
The code compared a QString* with a QString, which only compiled because the QStringRef(const QString*) ctor was implicit. We're going to fix that, and it's nice to see that the change exposes bugs like this one. The fix is to deref the QString* argument, which we know from previous checks to be non-nullptr, to enable normal QString/QString comparison. Change-Id: Idc7b214cb26e8b7c18ee1ba0a2b7236f814f0810 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
d08deb0b4a
commit
b950d9b10f
@ -670,7 +670,7 @@ void QGuiApplication::setApplicationDisplayName(const QString &name)
|
||||
disconnect(qGuiApp, &QGuiApplication::applicationNameChanged,
|
||||
qGuiApp, &QGuiApplication::applicationDisplayNameChanged);
|
||||
|
||||
if (QGuiApplicationPrivate::displayName != applicationName())
|
||||
if (*QGuiApplicationPrivate::displayName != applicationName())
|
||||
emit qGuiApp->applicationDisplayNameChanged();
|
||||
}
|
||||
} else if (name != *QGuiApplicationPrivate::displayName) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user