summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-03-03 17:16:10 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-09 18:20:41 +0000
commit7f0a919f4a9ff79613df8c9d9ebc7a2e8d88e035 (patch)
tree85a06c48f69a38451e806c40f173613d986ab865 /src
parentefa81e7bc9d148030123ce3cd96d599b26797cd8 (diff)
QDBusError: don't refer to a QT_NAMESPACE'ed get() as ::get()
This code predates the public history. I don't know exactly how this worked before, but I guess it's because the QT_USE_NAMESPACE in our headers. If there's _any_ get() function at the global scope, then name lookup stops there and considers _only_ that function. And if that happens to have a compatible signature, good night. Use unqualified lookup instead. That will find the QT_NAMESPACE one, ignoring other overloads at global scope. And when non-namespaced, will emit an ambiguity error in the presence of another matching get() function at global scope. Task-number: QTBUG-111598 Change-Id: Iea141ea543193394ba527b414caf31c1f3a2355b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b955648224929e07b133744742344b9a45ae9c9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/dbus/qdbuserror.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp
index 75df934379..6d8c3cf245 100644
--- a/src/dbus/qdbuserror.cpp
+++ b/src/dbus/qdbuserror.cpp
@@ -210,7 +210,7 @@ QDBusError::QDBusError(const DBusError *error)
if (!error || !q_dbus_error_is_set(error))
return;
- code = ::get(error->name);
+ code = get(error->name);
msg = QString::fromUtf8(error->message);
nm = QString::fromUtf8(error->name);
}
@@ -225,7 +225,7 @@ QDBusError::QDBusError(const QDBusMessage &qdmsg)
if (qdmsg.type() != QDBusMessage::ErrorMessage)
return;
- code = ::get(qdmsg.errorName().toUtf8().constData());
+ code = get(qdmsg.errorName().toUtf8().constData());
nm = qdmsg.errorName();
msg = qdmsg.errorMessage();
}
@@ -272,7 +272,7 @@ QDBusError &QDBusError::operator=(const QDBusError &other)
QDBusError &QDBusError::operator=(const QDBusMessage &qdmsg)
{
if (qdmsg.type() == QDBusMessage::ErrorMessage) {
- code = ::get(qdmsg.errorName().toUtf8().constData());
+ code = get(qdmsg.errorName().toUtf8().constData());
nm = qdmsg.errorName();
msg = qdmsg.errorMessage();
} else {