|
NuriaProject Framework
0.1
The NuriaProject Framework
|
Utilities for working with QVariants. More...
#include <variant.hpp>
Static Public Member Functions | |
| template<typename... Items> | |
| static QVariantList | buildList (const Items &...items) |
| static void * | getPointer (QVariant &variant) |
| static void * | stealPointer (QVariant &variant) |
Utilities for working with QVariants.
|
inlinestatic |
Builds a QVariantList out of all arguments passed to the method. This does the same as QVariantList () << QVariant::fromValue (first) << ... But it's easier and shorter to read and write.
NURIA_NO_CHAR_ARRAY_TO_QSTRING before including this header.
|
static |
Returns the pointer from variant, if variant contains a pointer type. Works both for T and T*. Ownership of the returned pointer is not taken from variant and variant itself is not changed. If the operation failed, nullptr is returned.
|
static |
Steals the pointer from variant and returns it. Works only for pointer types, that is, T* but not T. If variant is invalid, nullptr is returned. After return, variant will be invalid if it contained a pointer.
1.8.9.1