summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-03-12 20:01:37 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-03-13 09:11:32 +0000
commitb950d9b10fc64b2d73b832aea6569f3f1daf8f4f (patch)
treed8ba6fdb8a6154827b43bb38e3b0dfb9d648696f /src
parentd08deb0b4a64e24884eedaf5d8e20f967c38e82a (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index c057fccade..19f6a213f8 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -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) {