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 <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
08cd5580df
commit
db32369935
@ -104,11 +104,10 @@ namespace QNativeInterface::Private {
|
|||||||
I *nativeInterface() const \
|
I *nativeInterface() const \
|
||||||
{ \
|
{ \
|
||||||
using T = std::decay_t<decltype(*this)>; \
|
using T = std::decay_t<decltype(*this)>; \
|
||||||
using namespace QNativeInterface::Private; \
|
static_assert(QNativeInterface::Private::TypeInfo<I>::template isCompatibleWith<T>, \
|
||||||
static_assert(TypeInfo<I>::template isCompatibleWith<T>, \
|
|
||||||
"T::nativeInterface<I>() requires that native interface I is compatible with T"); \
|
"T::nativeInterface<I>() requires that native interface I is compatible with T"); \
|
||||||
\
|
\
|
||||||
return static_cast<I*>(resolveInterface(this, typeid(I), TypeInfo<I>::revision())); \
|
return static_cast<I*>(QNativeInterface::Private::resolveInterface(this, typeid(I), QNativeInterface::Private::TypeInfo<I>::revision())); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// Provides a definition for the interface destructor
|
// Provides a definition for the interface destructor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user