| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlvme_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | class QObject; | - | ||||||||||||
| 7 | class QJSValue; | - | ||||||||||||
| 8 | class QQmlScriptData; | - | ||||||||||||
| 9 | class QQmlContextData; | - | ||||||||||||
| 10 | - | |||||||||||||
| 11 | namespace QQmlVMETypes { | - | ||||||||||||
| 12 | struct List | - | ||||||||||||
| 13 | { | - | ||||||||||||
| 14 | List() : type(0) {} never executed: end of block | 0 | ||||||||||||
| 15 | List(int t) : type(t) {} never executed: end of block | 0 | ||||||||||||
| 16 | - | |||||||||||||
| 17 | int type; | - | ||||||||||||
| 18 | QQmlListProperty<void> qListProperty; | - | ||||||||||||
| 19 | }; | - | ||||||||||||
| 20 | struct State { | - | ||||||||||||
| 21 | enum Flag { Deferred = 0x00000001 }; | - | ||||||||||||
| 22 | - | |||||||||||||
| 23 | State() : flags(0), context(nullptr), instructionStream(nullptr) {} never executed: end of block | 0 | ||||||||||||
| 24 | quint32 flags; | - | ||||||||||||
| 25 | QQmlContextData *context; | - | ||||||||||||
| 26 | const char *instructionStream; | - | ||||||||||||
| 27 | QBitField bindingSkipList; | - | ||||||||||||
| 28 | }; | - | ||||||||||||
| 29 | } | - | ||||||||||||
| 30 | template<> class QTypeInfo<QQmlVMETypes::List > { public: enum { isSpecialized = true, isComplex = (((Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QQmlVMETypes::List)>sizeof(void*)), isPointer = false, isIntegral = std::is_integral< QQmlVMETypes::List >::value, isDummy = (((Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QQmlVMETypes::List) }; static inline const char *name() { return "QQmlVMETypes::List"; } }; | - | ||||||||||||
| 31 | template<> | - | ||||||||||||
| 32 | class QTypeInfo<QQmlVMETypes::State> : public QTypeInfoMerger<QQmlVMETypes::State, QBitField> {}; | - | ||||||||||||
| 33 | - | |||||||||||||
| 34 | class QQmlInstantiationInterrupt { | - | ||||||||||||
| 35 | public: | - | ||||||||||||
| 36 | inline QQmlInstantiationInterrupt(); | - | ||||||||||||
| 37 | inline QQmlInstantiationInterrupt(volatile bool *runWhile, int nsecs=0); | - | ||||||||||||
| 38 | inline QQmlInstantiationInterrupt(int nsecs); | - | ||||||||||||
| 39 | - | |||||||||||||
| 40 | inline void reset(); | - | ||||||||||||
| 41 | inline bool shouldInterrupt() const; | - | ||||||||||||
| 42 | private: | - | ||||||||||||
| 43 | enum Mode { None, Time, Flag }; | - | ||||||||||||
| 44 | Mode mode; | - | ||||||||||||
| 45 | QElapsedTimer timer; | - | ||||||||||||
| 46 | int nsecs; | - | ||||||||||||
| 47 | volatile bool *runWhile; | - | ||||||||||||
| 48 | }; | - | ||||||||||||
| 49 | - | |||||||||||||
| 50 | class __attribute__((visibility("default"))) QQmlVME | - | ||||||||||||
| 51 | { | - | ||||||||||||
| 52 | public: | - | ||||||||||||
| 53 | static void enableComponentComplete(); | - | ||||||||||||
| 54 | static void disableComponentComplete(); | - | ||||||||||||
| 55 | static bool componentCompleteEnabled(); | - | ||||||||||||
| 56 | - | |||||||||||||
| 57 | private: | - | ||||||||||||
| 58 | static bool s_enableComponentComplete; | - | ||||||||||||
| 59 | }; | - | ||||||||||||
| 60 | class QQmlVMEGuard | - | ||||||||||||
| 61 | { | - | ||||||||||||
| 62 | public: | - | ||||||||||||
| 63 | QQmlVMEGuard(); | - | ||||||||||||
| 64 | ~QQmlVMEGuard(); | - | ||||||||||||
| 65 | - | |||||||||||||
| 66 | void guard(QQmlObjectCreator *); | - | ||||||||||||
| 67 | void clear(); | - | ||||||||||||
| 68 | - | |||||||||||||
| 69 | bool isOK() const; | - | ||||||||||||
| 70 | - | |||||||||||||
| 71 | private: | - | ||||||||||||
| 72 | int m_objectCount; | - | ||||||||||||
| 73 | QPointer<QObject> *m_objects; | - | ||||||||||||
| 74 | int m_contextCount; | - | ||||||||||||
| 75 | QQmlGuardedContextData *m_contexts; | - | ||||||||||||
| 76 | }; | - | ||||||||||||
| 77 | - | |||||||||||||
| 78 | QQmlInstantiationInterrupt::QQmlInstantiationInterrupt() | - | ||||||||||||
| 79 | : mode(None), nsecs(0), runWhile(nullptr) | - | ||||||||||||
| 80 | { | - | ||||||||||||
| 81 | } executed 150100 times by 140 tests: end of blockExecuted by:
| 150100 | ||||||||||||
| 82 | - | |||||||||||||
| 83 | QQmlInstantiationInterrupt::QQmlInstantiationInterrupt(volatile bool *runWhile, int nsecs) | - | ||||||||||||
| 84 | : mode(Flag), nsecs(nsecs), runWhile(runWhile) | - | ||||||||||||
| 85 | { | - | ||||||||||||
| 86 | } executed 1580 times by 5 tests: end of blockExecuted by:
| 1580 | ||||||||||||
| 87 | - | |||||||||||||
| 88 | QQmlInstantiationInterrupt::QQmlInstantiationInterrupt(int nsecs) | - | ||||||||||||
| 89 | : mode(Time), nsecs(nsecs), runWhile(nullptr) | - | ||||||||||||
| 90 | { | - | ||||||||||||
| 91 | } executed 973 times by 9 tests: end of blockExecuted by:
| 973 | ||||||||||||
| 92 | - | |||||||||||||
| 93 | void QQmlInstantiationInterrupt::reset() | - | ||||||||||||
| 94 | { | - | ||||||||||||
| 95 | if (mode == Time
| 0-1580 | ||||||||||||
| 96 | timer.start(); executed 973 times by 9 tests: timer.start();Executed by:
| 973 | ||||||||||||
| 97 | } executed 2553 times by 10 tests: end of blockExecuted by:
| 2553 | ||||||||||||
| 98 | - | |||||||||||||
| 99 | bool QQmlInstantiationInterrupt::shouldInterrupt() const | - | ||||||||||||
| 100 | { | - | ||||||||||||
| 101 | if (mode == None
| 28559-1190778 | ||||||||||||
| 102 | return executed 1190778 times by 136 tests: false;return false;Executed by:
executed 1190778 times by 136 tests: return false;Executed by:
| 1190778 | ||||||||||||
| 103 | } else if (mode == Time
| 4220-24339 | ||||||||||||
| 104 | return executed 24339 times by 9 tests: timer.nsecsElapsed() > nsecs;return timer.nsecsElapsed() > nsecs;Executed by:
executed 24339 times by 9 tests: return timer.nsecsElapsed() > nsecs;Executed by:
| 24339 | ||||||||||||
| 105 | } else if (mode == Flag
| 0-4220 | ||||||||||||
| 106 | return executed 4220 times by 5 tests: !*runWhile || (nsecs && timer.nsecsElapsed() > nsecs);return !*runWhile || (nsecs && timer.nsecsElapsed() > nsecs);Executed by:
executed 4220 times by 5 tests: return !*runWhile || (nsecs && timer.nsecsElapsed() > nsecs);Executed by:
| 4220 | ||||||||||||
| 107 | } else { | - | ||||||||||||
| 108 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 109 | } | - | ||||||||||||
| 110 | } | - | ||||||||||||
| 111 | - | |||||||||||||
| 112 | - | |||||||||||||
| Switch to Source code | Preprocessed file |