From 713f1c633a0560664705268e43307d5dba9fad42 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 22 Aug 2022 17:02:23 +0200 Subject: [PATCH] Move definition of QT_MOC_COMPAT from qgloabl.h to qtconfigmacros.h Task-number: QTBUG-99313 Change-Id: I331aa5f1805a7e774d0fe8b819720c17767670b0 Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 8 -------- src/corelib/global/qtconfigmacros.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 42e8698965f..735143237c3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -63,14 +63,6 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOEXCEPT; #if defined(__cplusplus) -/* moc compats (signals/slots) */ -#ifndef QT_MOC_COMPAT -# define QT_MOC_COMPAT -#else -# undef QT_MOC_COMPAT -# define QT_MOC_COMPAT -#endif - #ifdef QT_ASCII_CAST_WARNINGS # define QT_ASCII_CAST_WARN \ Q_DECL_DEPRECATED_X("Use fromUtf8, QStringLiteral, or QLatin1StringView") diff --git a/src/corelib/global/qtconfigmacros.h b/src/corelib/global/qtconfigmacros.h index 3d22ae164cf..3765a75ddeb 100644 --- a/src/corelib/global/qtconfigmacros.h +++ b/src/corelib/global/qtconfigmacros.h @@ -61,6 +61,14 @@ #define QT_CONFIG(feature) (1/QT_FEATURE_##feature == 1) #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.") +/* moc compats (signals/slots) */ +#ifndef QT_MOC_COMPAT +# define QT_MOC_COMPAT +#else +# undef QT_MOC_COMPAT +# define QT_MOC_COMPAT +#endif + // valid for both C and C++ #define QT_MANGLE_NAMESPACE0(x) x #define QT_MANGLE_NAMESPACE1(a, b) a##_##b