 |
Qt 6.x
The Qt SDK
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
4#ifndef QCONSTRUCTORMACROS_H
5#define QCONSTRUCTORMACROS_H
8#pragma qt_class(QtConstructorMacros)
9#pragma qt_sync_stop_processing
12#if defined(__cplusplus)
14#ifndef Q_CONSTRUCTOR_FUNCTION
15# define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
17 static const struct AFUNC ## _ctor_class_ { \
18 inline AFUNC ## _ctor_class_() { AFUNC(); } \
19 } AFUNC ## _ctor_instance_; \
22# define Q_CONSTRUCTOR_FUNCTION(AFUNC) Q_CONSTRUCTOR_FUNCTION0(AFUNC)
25#ifndef Q_DESTRUCTOR_FUNCTION
26# define Q_DESTRUCTOR_FUNCTION0(AFUNC) \
28 static const struct AFUNC ## _dtor_class_ { \
29 inline AFUNC ## _dtor_class_() { } \
30 inline ~ AFUNC ## _dtor_class_() { AFUNC(); } \
31 } AFUNC ## _dtor_instance_; \
33# define Q_DESTRUCTOR_FUNCTION(AFUNC) Q_DESTRUCTOR_FUNCTION0(AFUNC)