From e54ff7754d83a3b7aa90be534bbaa9bc60367a97 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Fri, 30 Sep 2022 13:45:17 +0200 Subject: Move the rest of macros from qglobal to QtPreprocessorSupport We had only three macros left in QtGlobal: * QT_STRINGIFY * Q_UNUSED() * Q_UNIMPLEMENTED() There is no obvious existing header for them, so a new header is created. As a drive-by: add documentation for QT_STRINGIFY. Task-number: QTBUG-106154 Task-number: QTBUG-99313 Change-Id: I2d051dd3e69f13602893a0f0d6968419479b6c23 Reviewed-by: Thiago Macieira --- src/corelib/global/qglobal.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/corelib/global/qglobal.h') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index ef42bc9d35..e36d64d161 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -25,10 +25,7 @@ #include #include -/* These two macros makes it possible to turn the builtin line expander into a - * string literal. */ -#define QT_STRINGIFY2(x) #x -#define QT_STRINGIFY(x) QT_STRINGIFY2(x) +#include inline void qt_noop(void) {} @@ -40,22 +37,10 @@ inline void qt_noop(void) {} #include #include -/* - Avoid "unused parameter" warnings -*/ -#define Q_UNUSED(x) (void)x; #ifndef __ASSEMBLER__ -QT_BEGIN_NAMESPACE - #if defined(__cplusplus) -#if !defined(Q_UNIMPLEMENTED) -# define Q_UNIMPLEMENTED() qWarning("Unimplemented code.") -#endif - -QT_END_NAMESPACE - // We need to keep QTypeInfo, QSysInfo, QFlags, qDebug & family in qglobal.h for compatibility with Qt 4. // Be careful when changing the order of these files. #include -- cgit v1.2.3