summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-09-30 13:45:17 +0200
committerIvan Solovev <ivan.solovev@qt.io>2022-10-06 14:26:25 +0200
commite54ff7754d83a3b7aa90be534bbaa9bc60367a97 (patch)
treec300c1c499704e4ea679e305ef62316168f9adf0 /src/corelib/global/qglobal.h
parentdff985140a9f31632ba6630ec3391be55051a7ac (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h17
1 files changed, 1 insertions, 16 deletions
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 <QtCore/qtconfigmacros.h>
#include <QtCore/qtcoreexports.h>
-/* 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 <QtCore/qtpreprocessorsupport.h>
inline void qt_noop(void) {}
@@ -40,22 +37,10 @@ inline void qt_noop(void) {}
#include <QtCore/qtypes.h>
#include <QtCore/qtclasshelpermacros.h>
-/*
- 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 <QtCore/qtypeinfo.h>