diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-13 11:33:30 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-24 00:17:33 +0200 |
commit | 4ccf76ff53a68850772f45a04527694de9f8da18 (patch) | |
tree | 18f1d45d0270a3007087160ad50db47d58fd8f58 /src/corelib/kernel/qmetatype_p.h | |
parent | e45fa5aaf0abdbd87c3d68175fc5171a7d96a49f (diff) |
Start porting conversions over from QVariant to QMetaType
This will ensure full symmetry in what QVariant and
QMetaType support. With this done, QVariant will become
simply a container that can hold any QMetaType with fully
symmetric functionality between both.
Change-Id: I796d4368a2bc0f08cf4f70f4465ed6a0e07bdd76
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetatype_p.h')
-rw-r--r-- | src/corelib/kernel/qmetatype_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h index bda4301afd..7ddad4038d 100644 --- a/src/corelib/kernel/qmetatype_p.h +++ b/src/corelib/kernel/qmetatype_p.h @@ -137,6 +137,9 @@ QT_WARNING_POP To &result = *static_cast<To *>(to); \ assign_and_return \ } +#define QMETATYPE_CONVERTER_ASSIGN(To, From) \ + QMETATYPE_CONVERTER(To, From, result = To(source); return true;) + #define QMETATYPE_CONVERTER_FUNCTION(To, assign_and_return) \ { \ To &result = *static_cast<To *>(r); \ |