From db32369935b19a1d428595f1b28dc714950beefc Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 14 May 2021 08:34:21 +0200 Subject: [PATCH] native interface plumbing: Fix ambiguities with existing classes named TypeInfo As is the case in Qt for Python, causing: QtCore/qcoreapplication.h: In member function I* QCoreApplication::nativeInterface() const: QtCore/qcoreapplication.h:163:5: error: reference to TypeInfo is ambiguous 163 | QT_DECLARE_NATIVE_INTERFACE_ACCESSOR Amends 7feeb7c34b9fbab2593b958354dd57b4c487d5fe. Change-Id: I7d363e1d8c0a0f648d12f8040afb9d071356cbb8 Reviewed-by: Qt CI Bot Reviewed-by: Volker Hilsheimer --- src/corelib/global/qnativeinterface.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qnativeinterface.h b/src/corelib/global/qnativeinterface.h index e634615260c..d009ec5340b 100644 --- a/src/corelib/global/qnativeinterface.h +++ b/src/corelib/global/qnativeinterface.h @@ -104,11 +104,10 @@ namespace QNativeInterface::Private { I *nativeInterface() const \ { \ using T = std::decay_t; \ - using namespace QNativeInterface::Private; \ - static_assert(TypeInfo::template isCompatibleWith, \ + static_assert(QNativeInterface::Private::TypeInfo::template isCompatibleWith, \ "T::nativeInterface() requires that native interface I is compatible with T"); \ \ - return static_cast(resolveInterface(this, typeid(I), TypeInfo::revision())); \ + return static_cast(QNativeInterface::Private::resolveInterface(this, typeid(I), QNativeInterface::Private::TypeInfo::revision())); \ } // Provides a definition for the interface destructor