diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-23 17:15:44 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-08-25 16:53:47 +0200 |
commit | 4da3350f151a978521fc3712f151c4d3bed9d846 (patch) | |
tree | 826fd5f33f8a2afb56c8bfaf35dce128f56eef1a /src/corelib/global/qglobal.h | |
parent | e57d2d72798f78e661c2160652477ada41d2d8d4 (diff) |
Extract header qconstructormacros.h from qglobal.h
Task-number: QTBUG-99313
Change-Id: I3861a3095148c7927aabd8becf6f7b534f214fba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index fcc61d5397..ca0f09ef5c 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -70,28 +70,6 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION const char *qVersion(void) Q_DECL_NOEXCEPT; #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 - /* moc compats (signals/slots) */ #ifndef QT_MOC_COMPAT # define QT_MOC_COMPAT @@ -240,6 +218,7 @@ QT_END_NAMESPACE #include <QtCore/qflags.h> #include <QtCore/qatomic.h> +#include <QtCore/qconstructormacros.h> #include <QtCore/qenvironmentvariables.h> #include <QtCore/qexceptionhandling.h> #include <QtCore/qforeach.h> |