| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlcomponent.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | class QByteArray; | - | ||||||||||||||||||||||||
| 7 | class QQmlEngine; | - | ||||||||||||||||||||||||
| 8 | class QQmlComponent; | - | ||||||||||||||||||||||||
| 9 | class QQmlIncubator; | - | ||||||||||||||||||||||||
| 10 | class QQmlV4Function; | - | ||||||||||||||||||||||||
| 11 | class QQmlComponentPrivate; | - | ||||||||||||||||||||||||
| 12 | class QQmlComponentAttached; | - | ||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||
| 14 | namespace QV4 { | - | ||||||||||||||||||||||||
| 15 | namespace CompiledData { | - | ||||||||||||||||||||||||
| 16 | struct CompilationUnit; | - | ||||||||||||||||||||||||
| 17 | } | - | ||||||||||||||||||||||||
| 18 | } | - | ||||||||||||||||||||||||
| 19 | - | |||||||||||||||||||||||||
| 20 | class __attribute__((visibility("default"))) QQmlComponent : public QObject | - | ||||||||||||||||||||||||
| 21 | { | - | ||||||||||||||||||||||||
| 22 | public: | - | ||||||||||||||||||||||||
| 23 | #pragma GCC diagnostic push | - | ||||||||||||||||||||||||
| 24 | - | |||||||||||||||||||||||||
| 25 | #pragma GCC diagnostic ignored "-Wsuggest-override" | - | ||||||||||||||||||||||||
| 26 | static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private: | - | ||||||||||||||||||||||||
| 27 | #pragma GCC diagnostic ignored "-Wattributes" | - | ||||||||||||||||||||||||
| 28 | __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); | - | ||||||||||||||||||||||||
| 29 | #pragma GCC diagnostic pop | - | ||||||||||||||||||||||||
| 30 | struct QPrivateSignal {}; | - | ||||||||||||||||||||||||
| 31 | inline QQmlComponentPrivate* d_func() { return executed 388580 times by 142 tests: reinterpret_cast<QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 388580 times by 142 tests: } inline const QQmlComponentPrivate* d_func() const { returnreturn reinterpret_cast<QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 312505 times by 142 tests: reinterpret_cast<const QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));return reinterpret_cast<const QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));Executed by:
executed 312505 times by 142 tests: } friend class QQmlComponentPrivate;return reinterpret_cast<const QQmlComponentPrivate *>(qGetPtrHelper(d_ptr));Executed by:
| 312505-388580 | ||||||||||||||||||||||||
| 32 | - | |||||||||||||||||||||||||
| 33 | - | |||||||||||||||||||||||||
| 34 | - | |||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||
| 36 | - | |||||||||||||||||||||||||
| 37 | public: | - | ||||||||||||||||||||||||
| 38 | enum CompilationMode { PreferSynchronous, Asynchronous }; | - | ||||||||||||||||||||||||
| 39 | friend constexpr const QMetaObject *qt_getEnumMetaObject(CompilationMode) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(CompilationMode) noexcept { return "CompilationMode"; } | - | ||||||||||||||||||||||||
| 40 | - | |||||||||||||||||||||||||
| 41 | QQmlComponent(QObject *parent = nullptr); | - | ||||||||||||||||||||||||
| 42 | QQmlComponent(QQmlEngine *, QObject *parent = nullptr); | - | ||||||||||||||||||||||||
| 43 | QQmlComponent(QQmlEngine *, const QString &fileName, QObject *parent = nullptr); | - | ||||||||||||||||||||||||
| 44 | QQmlComponent(QQmlEngine *, const QString &fileName, CompilationMode mode, QObject *parent = nullptr); | - | ||||||||||||||||||||||||
| 45 | QQmlComponent(QQmlEngine *, const QUrl &url, QObject *parent = nullptr); | - | ||||||||||||||||||||||||
| 46 | QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = nullptr); | - | ||||||||||||||||||||||||
| 47 | ~QQmlComponent() override; | - | ||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||
| 49 | enum Status { Null, Ready, Loading, Error }; | - | ||||||||||||||||||||||||
| 50 | friend constexpr const QMetaObject *qt_getEnumMetaObject(Status) noexcept { return &staticMetaObject; } friend constexpr const char *qt_getEnumName(Status) noexcept { return "Status"; } | - | ||||||||||||||||||||||||
| 51 | Status status() const; | - | ||||||||||||||||||||||||
| 52 | - | |||||||||||||||||||||||||
| 53 | bool isNull() const; | - | ||||||||||||||||||||||||
| 54 | bool isReady() const; | - | ||||||||||||||||||||||||
| 55 | bool isError() const; | - | ||||||||||||||||||||||||
| 56 | bool isLoading() const; | - | ||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||
| 58 | QList<QQmlError> errors() const; | - | ||||||||||||||||||||||||
| 59 | QString errorString() const; | - | ||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||
| 61 | qreal progress() const; | - | ||||||||||||||||||||||||
| 62 | - | |||||||||||||||||||||||||
| 63 | QUrl url() const; | - | ||||||||||||||||||||||||
| 64 | - | |||||||||||||||||||||||||
| 65 | virtual QObject *create(QQmlContext *context = nullptr); | - | ||||||||||||||||||||||||
| 66 | virtual QObject *beginCreate(QQmlContext *); | - | ||||||||||||||||||||||||
| 67 | virtual void completeCreate(); | - | ||||||||||||||||||||||||
| 68 | - | |||||||||||||||||||||||||
| 69 | void create(QQmlIncubator &, QQmlContext *context = nullptr, | - | ||||||||||||||||||||||||
| 70 | QQmlContext *forContext = nullptr); | - | ||||||||||||||||||||||||
| 71 | - | |||||||||||||||||||||||||
| 72 | QQmlContext *creationContext() const; | - | ||||||||||||||||||||||||
| 73 | - | |||||||||||||||||||||||||
| 74 | static QQmlComponentAttached *qmlAttachedProperties(QObject *); | - | ||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||
| 76 | public : | - | ||||||||||||||||||||||||
| 77 | void loadUrl(const QUrl &url); | - | ||||||||||||||||||||||||
| 78 | void loadUrl(const QUrl &url, CompilationMode mode); | - | ||||||||||||||||||||||||
| 79 | void setData(const QByteArray &, const QUrl &baseUrl); | - | ||||||||||||||||||||||||
| 80 | - | |||||||||||||||||||||||||
| 81 | public : | - | ||||||||||||||||||||||||
| 82 | void statusChanged(QQmlComponent::Status); | - | ||||||||||||||||||||||||
| 83 | void progressChanged(qreal); | - | ||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||
| 85 | protected: | - | ||||||||||||||||||||||||
| 86 | QQmlComponent(QQmlComponentPrivate &dd, QObject* parent); | - | ||||||||||||||||||||||||
| 87 | void createObject(QQmlV4Function *); | - | ||||||||||||||||||||||||
| 88 | void incubateObject(QQmlV4Function *); | - | ||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||
| 90 | private: | - | ||||||||||||||||||||||||
| 91 | QQmlComponent(QQmlEngine *, QV4::CompiledData::CompilationUnit *compilationUnit, int, QObject *parent); | - | ||||||||||||||||||||||||
| 92 | - | |||||||||||||||||||||||||
| 93 | QQmlComponent(const QQmlComponent &) = delete; QQmlComponent &operator=(const QQmlComponent &) = delete; | - | ||||||||||||||||||||||||
| 94 | friend class QQmlTypeData; | - | ||||||||||||||||||||||||
| 95 | friend class QQmlObjectCreator; | - | ||||||||||||||||||||||||
| 96 | }; | - | ||||||||||||||||||||||||
| 97 | - | |||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||
| 99 | - | |||||||||||||||||||||||||
| 100 | template <> struct QMetaTypeId< QQmlComponent * > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const
never executed: id;return id;never executed: const int newId = qRegisterMetaType< QQmlComponent * >("QQmlComponent *", reinterpret_cast< QQmlComponent * *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id;never executed: newId;return newId;never executed: } }; template <> struct QMetaTypeId< QQmlListProperty<QQmlComponent> > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (constreturn newId;
never executed: id;return id;never executed: const int newId = qRegisterMetaType< QQmlListProperty<QQmlComponent> >("QQmlListProperty<QQmlComponent>", reinterpret_cast< QQmlListProperty<QQmlComponent> *>(quintptr(-1))); metatype_id.storeRelease(newId); returnreturn id;never executed: newId;return newId;never executed: } };return newId; | 0 | ||||||||||||||||||||||||
| 101 | template <> class QQmlTypeInfo<QQmlComponent > { public: enum { hasAttachedProperties = (((QML_HAS_ATTACHED_PROPERTIES) & QML_HAS_ATTACHED_PROPERTIES) == QML_HAS_ATTACHED_PROPERTIES) }; }; | - | ||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |