summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d3e2898a99..c9851d37f4 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -151,28 +151,6 @@ namespace QT_NAMESPACE {}
# define QT_LARGEFILE_SUPPORT 64
#endif
-#ifndef Q_CONSTRUCTOR_FUNCTION
-# define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
- namespace { \
- static const struct AFUNC ## _ctor_class_ { \
- inline AFUNC ## _ctor_class_() { AFUNC(); } \
- } AFUNC ## _ctor_instance_; \
- }
-
-# define Q_CONSTRUCTOR_FUNCTION(AFUNC) Q_CONSTRUCTOR_FUNCTION0(AFUNC)
-#endif
-
-#ifndef Q_DESTRUCTOR_FUNCTION
-# define Q_DESTRUCTOR_FUNCTION0(AFUNC) \
- namespace { \
- static const struct AFUNC ## _dtor_class_ { \
- inline AFUNC ## _dtor_class_() { } \
- inline ~ AFUNC ## _dtor_class_() { AFUNC(); } \
- } AFUNC ## _dtor_instance_; \
- }
-# define Q_DESTRUCTOR_FUNCTION(AFUNC) Q_DESTRUCTOR_FUNCTION0(AFUNC)
-#endif
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -223,6 +201,28 @@ typedef quint64 qulonglong;
#if defined(__cplusplus)
+#ifndef Q_CONSTRUCTOR_FUNCTION
+# define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
+ namespace { \
+ static const struct AFUNC ## _ctor_class_ { \
+ inline AFUNC ## _ctor_class_() { AFUNC(); } \
+ } AFUNC ## _ctor_instance_; \
+ }
+
+# define Q_CONSTRUCTOR_FUNCTION(AFUNC) Q_CONSTRUCTOR_FUNCTION0(AFUNC)
+#endif
+
+#ifndef Q_DESTRUCTOR_FUNCTION
+# define Q_DESTRUCTOR_FUNCTION0(AFUNC) \
+ namespace { \
+ static const struct AFUNC ## _dtor_class_ { \
+ inline AFUNC ## _dtor_class_() { } \
+ inline ~ AFUNC ## _dtor_class_() { AFUNC(); } \
+ } AFUNC ## _dtor_instance_; \
+ }
+# define Q_DESTRUCTOR_FUNCTION(AFUNC) Q_DESTRUCTOR_FUNCTION0(AFUNC)
+#endif
+
namespace QtPrivate {
template <class T>
struct AlignOfHelper