e996253774
MSVC will export any function in an exported class, including inline ones. Conversely: client code calling inline functions in imported classes will end up simply calling the symbol of the function, even if the function is fully inline. This is a problem for adding post-C++17 APIs in Qt. Such APIs are added as inline functions protected by feature-macro tests, so that both Qt and client apps can use any C++ version they want (any combination works). However, if we add a function using post-C++17 API to an exported class, then the combination "Qt built in C++17" + "client built in post-C++17" won't work any more. The client will expect the symbol for that function to be exported by Qt, but Qt won't have it (built in C++17). As a workaround, add a marker that turns these functions into "faux templates", like Q_WEAK_OVERLOAD does. Change-Id: I2adab81e3129c881c5a8e0772948b176fa4db1b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
235 lines
10 KiB
Plaintext
235 lines
10 KiB
Plaintext
versionsym = QT_VERSION_STR
|
|
|
|
defines += Q_QDOC \
|
|
Q_CLANG_QDOC \
|
|
QT_.*_SUPPORT \
|
|
QT_.*_LIB \
|
|
QT_COMPAT \
|
|
QT_KEYPAD_NAVIGATION \
|
|
QT_NO_EGL \
|
|
Q_BYTE_ORDER \
|
|
QT_DEPRECATED \
|
|
QT_DEPRECATED_* \
|
|
Q_NO_USING_KEYWORD \
|
|
Q_OS_.* \
|
|
Q_COMPILER_INITIALIZER_LISTS \
|
|
Q_COMPILER_UNIFORM_INIT \
|
|
Q_COMPILER_RVALUE_REFS
|
|
|
|
clangdefines += Q_QDOC \
|
|
Q_CLANG_QDOC \
|
|
QT_COMPAT \
|
|
QT_BUILD_CORE_LIB \
|
|
QT_BUILD_EGL_DEVICE_LIB \
|
|
QT_BUILD_LOCATION_LIB \
|
|
QT_BUILD_SCRIPT_LIB \
|
|
QT_BUILD_TESTLIB_LIB \
|
|
QT_BUILD_WIDGETS_LIB \
|
|
QT_CORE_LIB \
|
|
QT_DEPRECATED \
|
|
QT_GUI_LIB \
|
|
QT_KEYPAD_NAVIGATION \
|
|
QT_LARGEFILE_SUPPORT \
|
|
QT_NETWORK_LIB \
|
|
QT_NO_EGL \
|
|
QT_OPENGL_SUPPORT \
|
|
QT_SCRIPT_LIB \
|
|
QT_SHARED_POINTER_BACKTRACE_SUPPORT \
|
|
QT_WIDGETS_LIB \
|
|
Q_BYTE_ORDER \
|
|
Q_CC_CLANG \
|
|
Q_COMPILER_CONSTEXPR \
|
|
Q_COMPILER_DEFAULT_MEMBERS \
|
|
Q_COMPILER_DELETE_MEMBERS \
|
|
Q_COMPILER_EXPLICIT_OVERRIDES \
|
|
Q_COMPILER_INITIALIZER_LISTS \
|
|
Q_COMPILER_MANGLES_RETURN_TYPE \
|
|
Q_COMPILER_NOEXCEPT \
|
|
Q_COMPILER_NULLPTR \
|
|
Q_COMPILER_RVALUE_REFS \
|
|
Q_COMPILER_STATIC_ASSERT \
|
|
Q_COMPILER_UNIFORM_INIT \
|
|
Q_COMPILER_VARIADIC_MACROS \
|
|
Q_COMPILER_VARIADIC_TEMPLATES \
|
|
Q_ATOMIC_INT16_IS_SUPPORTED \
|
|
Q_ATOMIC_INT64_IS_SUPPORTED \
|
|
Q_ATOMIC_INT8_IS_SUPPORTED
|
|
|
|
# Q_COMPILER_REF_QUALIFIERS is not yet supported by all compilers
|
|
|
|
Cpp.ignoretokens += \
|
|
ENGINIOCLIENT_EXPORT \
|
|
PHONON_EXPORT \
|
|
Q_ALWAYS_INLINE \
|
|
Q_AUTOTEST_EXPORT \
|
|
Q_BLUETOOTH_EXPORT \
|
|
Q_COMPAT_EXPORT \
|
|
Q_CORE_EXPORT \
|
|
Q_CORE_EXPORT_INLINE \
|
|
Q_DBUS_EXPORT \
|
|
Q_DECL_CONSTEXPR \
|
|
Q_DECL_RELAXED_CONSTEXPR \
|
|
Q_DECL_CONST_FUNCTION \
|
|
Q_DECL_DEPRECATED \
|
|
Q_DECL_NOEXCEPT \
|
|
Q_DECL_FINAL \
|
|
Q_DECL_OVERRIDE \
|
|
Q_DECL_NOTHROW \
|
|
Q_DECL_PURE_FUNCTION \
|
|
Q_DECL_UNUSED \
|
|
Q_DECL_CF_RETURNS_RETAINED \
|
|
Q_DECL_NS_RETURNS_AUTORELEASED \
|
|
Q_DECL_EQ_DEFAULT \
|
|
Q_DECLARATIVE_EXPORT \
|
|
Q_EXPLICIT \
|
|
Q_EXPORT \
|
|
Q_EXPORT_PLUGIN \
|
|
Q_EXPORT_PLUGIN2 \
|
|
Q_GADGET \
|
|
Q_GADGET_EXPORT \
|
|
Q_GFX_INLINE \
|
|
Q_GUI_EXPORT \
|
|
Q_GUI_EXPORT_INLINE \
|
|
Q_GUI_EXPORT_STYLE_CDE \
|
|
Q_GUI_EXPORT_STYLE_COMPACT \
|
|
Q_GUI_EXPORT_STYLE_MAC \
|
|
Q_GUI_EXPORT_STYLE_MOTIF \
|
|
Q_GUI_EXPORT_STYLE_MOTIFPLUS \
|
|
Q_GUI_EXPORT_STYLE_PLATINUM \
|
|
Q_GUI_EXPORT_STYLE_POCKETPC \
|
|
Q_GUI_EXPORT_STYLE_SGI \
|
|
Q_GUI_EXPORT_STYLE_WINDOWS \
|
|
Q_INLINE_TEMPLATE \
|
|
Q_INTERNAL_WIN_NO_THROW \
|
|
Q_INVOKABLE \
|
|
Q_LOCATION_EXPORT \
|
|
Q_POSITIONING_EXPORT \
|
|
Q_MULTIMEDIA_EXPORT \
|
|
Q_NAMESPACE \
|
|
Q_NAMESPACE_EXPORT \
|
|
Q_NETWORK_EXPORT \
|
|
Q_NEVER_INLINE \
|
|
Q_NORETURN \
|
|
Q_OPENGL_EXPORT \
|
|
Q_OPENVG_EXPORT \
|
|
Q_OUTOFLINE_TEMPLATE \
|
|
Q_PRINTSUPPORT_EXPORT \
|
|
Q_QML_EXPORT \
|
|
Q_REQUIRED_RESULT \
|
|
Q_SCRIPT_EXPORT \
|
|
Q_SCRIPTTOOLS_EXPORT \
|
|
Q_SERIALBUS_EXPORT \
|
|
Q_SQL_EXPORT \
|
|
Q_SVG_EXPORT \
|
|
Q_TESTLIB_EXPORT \
|
|
Q_TYPENAME \
|
|
Q_WEAK_OVERLOAD \
|
|
Q_WIDGETS_EXPORT \
|
|
Q_WINEXTRAS_EXPORT \
|
|
Q_XML_EXPORT \
|
|
Q_XMLPATTERNS_EXPORT \
|
|
Q_XMLSTREAM_EXPORT \
|
|
QAXFACTORY_EXPORT \
|
|
QDBUS_EXPORT \
|
|
QDESIGNER_COMPONENTS_LIBRARY \
|
|
QDESIGNER_EXTENSION_LIBRARY \
|
|
QDESIGNER_SDK_LIBRARY \
|
|
QDESIGNER_SHARED_LIBRARY \
|
|
QDESIGNER_UILIB_LIBRARY \
|
|
QHELP_EXPORT \
|
|
QM_AUTOTEST_EXPORT \
|
|
QM_EXPORT_CANVAS \
|
|
QM_EXPORT_DNS \
|
|
QM_EXPORT_DOM \
|
|
QM_EXPORT_FTP \
|
|
QM_EXPORT_HTTP \
|
|
QM_EXPORT_ICONVIEW \
|
|
QM_EXPORT_NETWORK \
|
|
QM_EXPORT_OPENGL \
|
|
QM_EXPORT_OPENVG \
|
|
QM_EXPORT_SQL \
|
|
QM_EXPORT_TABLE \
|
|
QM_EXPORT_WORKSPACE \
|
|
QM_EXPORT_XML \
|
|
QT_ASCII_CAST_WARN \
|
|
QT_ASCII_CAST_WARN_CONSTRUCTOR \
|
|
QT_BEGIN_INCLUDE_NAMESPACE \
|
|
QT_BEGIN_NAMESPACE \
|
|
QT_BOOTSTRAPPED \
|
|
QT_DESIGNER_STATIC \
|
|
QT_END_INCLUDE_NAMESPACE \
|
|
QT_END_NAMESPACE \
|
|
QT_FASTCALL \
|
|
QT_MUTEX_LOCK_NOEXCEPT \
|
|
QT_POPCOUNT_CONSTEXPR \
|
|
QT_POST_CXX17_API_IN_EXPORTED_CLASS \
|
|
QT_SIZEPOLICY_CONSTEXPR \
|
|
QT_WARNING_DISABLE_DEPRECATED \
|
|
QT_WARNING_PUSH \
|
|
QT_WARNING_POP \
|
|
QT_WIDGET_PLUGIN_EXPORT \
|
|
QWEBKIT_EXPORT
|
|
|
|
Cpp.ignoredirectives += \
|
|
__attribute__ \
|
|
K_DECLARE_PRIVATE \
|
|
PHONON_HEIR \
|
|
PHONON_OBJECT \
|
|
Q_CLASSINFO \
|
|
Q_DECLARE_INTERFACE \
|
|
Q_DECLARE_METATYPE \
|
|
QT_DECL_METATYPE_EXTERN \
|
|
QT_IMPL_METATYPE_EXTERN \
|
|
Q_DECLARE_OPERATORS_FOR_FLAGS \
|
|
Q_DECLARE_PRIVATE \
|
|
Q_DECLARE_PRIVATE_D \
|
|
Q_DECLARE_PUBLIC \
|
|
Q_DECLARE_SHARED \
|
|
Q_DECLARE_TR_FUNCTIONS \
|
|
Q_DECLARE_TYPEINFO \
|
|
Q_DECL_NOEXCEPT_EXPR \
|
|
QT_DEPRECATED_X \
|
|
QT_SYSINFO_DEPRECATED_X \
|
|
Q_DISABLE_COPY \
|
|
Q_DUMMY_COMPARISON_OPERATOR \
|
|
Q_ENUM \
|
|
Q_ENUMS \
|
|
Q_ENUM_NS \
|
|
Q_FLAG \
|
|
Q_FLAGS \
|
|
Q_FLAG_NS \
|
|
QT_HAS_INCLUDE \
|
|
Q_INTERFACES \
|
|
Q_PRIVATE_PROPERTY \
|
|
QT_FORWARD_DECLARE_CLASS \
|
|
Q_DECLARE_HANDLE \
|
|
Q_REVISION \
|
|
QT_WARNING_DISABLE_CLANG \
|
|
QT_WARNING_DISABLE_GCC \
|
|
QT_WARNING_DISABLE_INTEL \
|
|
QT_WARNING_DISABLE_MSVC \
|
|
Q_ATTRIBUTE_FORMAT_PRINTF \
|
|
Q_MV_IOS \
|
|
QT6_ONLY \
|
|
QT7_ONLY
|
|
|
|
# Qt 6: Remove
|
|
falsehoods += \
|
|
"QT_VERSION >= QT_VERSION_CHECK\\(\\s*6\\s*,\\s*0\\s*,\\s*0\\s*\\)"
|
|
|
|
|
|
excludefiles += \
|
|
"*_posix.cpp" \
|
|
"*_android.cpp" \
|
|
"*_win.cpp" \
|
|
"*_icu.cpp" \
|
|
"*_msvc.cpp" \
|
|
"*_wince.cpp" \
|
|
"*_winrt.cpp" \
|
|
"*_mac.cpp" \
|
|
"*_macx.cpp" \
|
|
"*_unix.cpp" \
|
|
"*_udev.cpp" \
|
|
"*_vxworks.cpp" \
|
|
"*_darwin.cpp"
|