| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | namespace { | - |
| 7 | static void construct(QVariant::Private *x, const void *copy) | - |
| 8 | { | - |
| 9 | switch (x->type) { | - |
| 10 | case QVariant::SizePolicy: | - |
| 11 | v_construct<QSizePolicy>(x, copy); | - |
| 12 | break; executed: break;Execution Count:6 | 6 |
| 13 | default: | - |
| 14 | QMessageLogger("kernel/qwidgetsvariant.cpp", 60, __PRETTY_FUNCTION__).warning("Trying to construct an instance of an invalid type, type id: %i", x->type); | - |
| 15 | x->type = QVariant::Invalid; | - |
| 16 | return; | 0 |
| 17 | } | - |
| 18 | x->is_null = !copy; | - |
| 19 | } executed: }Execution Count:6 | 6 |
| 20 | | - |
| 21 | static void clear(QVariant::Private *d) | - |
| 22 | { | - |
| 23 | switch (d->type) { | - |
| 24 | case QVariant::SizePolicy: | - |
| 25 | v_clear<QSizePolicy>(d); | - |
| 26 | break; executed: break;Execution Count:6 | 6 |
| 27 | default: | - |
| 28 | qt_noop(); | - |
| 29 | return; | 0 |
| 30 | } | - |
| 31 | | - |
| 32 | d->type = QVariant::Invalid; | - |
| 33 | d->is_null = true; | - |
| 34 | d->is_shared = false; | - |
| 35 | } executed: }Execution Count:6 | 6 |
| 36 | | - |
| 37 | | - |
| 38 | static bool isNull(const QVariant::Private *) | - |
| 39 | { | - |
| 40 | return false; executed: return false;Execution Count:1 | 1 |
| 41 | } | - |
| 42 | | - |
| 43 | static bool compare(const QVariant::Private *a, const QVariant::Private *b) | - |
| 44 | { | - |
| 45 | qt_noop(); | - |
| 46 | switch(a->type) { | - |
| 47 | case QVariant::SizePolicy: | - |
| 48 | return *v_cast<QSizePolicy>(a) == *v_cast<QSizePolicy>(b); never executed: return *v_cast<QSizePolicy>(a) == *v_cast<QSizePolicy>(b); | 0 |
| 49 | default: | - |
| 50 | qt_noop(); | - |
| 51 | } | 0 |
| 52 | return false; never executed: return false; | 0 |
| 53 | } | - |
| 54 | | - |
| 55 | static bool convert(const QVariant::Private *d, int type, void *result, bool *ok) | - |
| 56 | { | - |
| 57 | (void)d;; | - |
| 58 | (void)type;; | - |
| 59 | (void)result;; | - |
| 60 | if (ok) | 0 |
| 61 | *ok = false; never executed: *ok = false; | 0 |
| 62 | return false; never executed: return false; | 0 |
| 63 | } | - |
| 64 | | - |
| 65 | | - |
| 66 | static void streamDebug(QDebug dbg, const QVariant &v) | - |
| 67 | { | - |
| 68 | QVariant::Private *d = const_cast<QVariant::Private *>(&v.data_ptr()); | - |
| 69 | switch (d->type) { | - |
| 70 | case QVariant::SizePolicy: | - |
| 71 | dbg.nospace() << *v_cast<QSizePolicy>(d); | - |
| 72 | break; executed: break;Execution Count:1 | 1 |
| 73 | default: | - |
| 74 | dbg.nospace() << "QMetaType::Type(" << d->type << ")"; | - |
| 75 | } | 0 |
| 76 | } executed: }Execution Count:1 | 1 |
| 77 | | - |
| 78 | | - |
| 79 | static const QVariant::Handler widgets_handler = { | - |
| 80 | construct, | - |
| 81 | clear, | - |
| 82 | isNull, | - |
| 83 | | - |
| 84 | 0, | - |
| 85 | 0, | - |
| 86 | | - |
| 87 | compare, | - |
| 88 | convert, | - |
| 89 | 0, | - |
| 90 | | - |
| 91 | streamDebug | - |
| 92 | | - |
| 93 | | - |
| 94 | | - |
| 95 | }; | - |
| 96 | | - |
| 97 | | - |
| 98 | | - |
| 99 | | - |
| 100 | static const QMetaTypeInterface qVariantWidgetsHelper[] = { | - |
| 101 | { (QtMetaTypePrivate::QMetaTypeFunctionHelper<QSizePolicy, QtMetaTypePrivate::TypeDefinition<QSizePolicy>::IsAvailable>::Create), (QtMetaTypePrivate::QMetaTypeFunctionHelper<QSizePolicy, QtMetaTypePrivate::TypeDefinition<QSizePolicy>::IsAvailable>::Delete), (QtMetaTypePrivate::QMetaTypeFunctionHelper<QSizePolicy, QtMetaTypePrivate::TypeDefinition<QSizePolicy>::IsAvailable>::Save), (QtMetaTypePrivate::QMetaTypeFunctionHelper<QSizePolicy, QtMetaTypePrivate::TypeDefinition<QSizePolicy>::IsAvailable>::Load), (QtMetaTypePrivate::QMetaTypeFunctionHelper<QSizePolicy, QtMetaTypePrivate::TypeDefinition<QSizePolicy>::IsAvailable>::Construct), (QtMetaTypePrivate::QMetaTypeFunctionHelper<QSizePolicy, QtMetaTypePrivate::TypeDefinition<QSizePolicy>::IsAvailable>::Destruct), (QTypeInfo<QSizePolicy>::sizeOf), QtPrivate::QMetaTypeTypeFlags<QSizePolicy>::Flags, (QtPrivate::MetaObjectForType<QSizePolicy>::value()) }, | - |
| 102 | }; | - |
| 103 | | - |
| 104 | | - |
| 105 | | - |
| 106 | } | - |
| 107 | | - |
| 108 | extern __attribute__((visibility("default"))) const QMetaTypeInterface *qMetaTypeWidgetsHelper; | - |
| 109 | | - |
| 110 | void qRegisterWidgetsVariant() | - |
| 111 | { | - |
| 112 | qRegisterMetaType<QWidget*>(); | - |
| 113 | qMetaTypeWidgetsHelper = qVariantWidgetsHelper; | - |
| 114 | QVariantPrivate::registerHandler(QModulesPrivate::Widgets, &widgets_handler); | - |
| 115 | } executed: }Execution Count:351 | 351 |
| 116 | namespace { static const struct qRegisterWidgetsVariant_ctor_class_ { inline qRegisterWidgetsVariant_ctor_class_() { qRegisterWidgetsVariant(); } } qRegisterWidgetsVariant_ctor_instance_; } executed: }Execution Count:136 | 136 |
| 117 | | - |
| 118 | | - |
| 119 | | - |
| | |