| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/util/qqmladaptormodel_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | static_assert(bool(1 == 1), "Required feature " "qml_delegate_model" " for file " __FILE__ " not available."); | - |
| 5 | - | |
| 6 | - | |
| 7 | - | |
| 8 | class QQmlEngine; | - |
| 9 | - | |
| 10 | class QQmlDelegateModel; | - |
| 11 | class QQmlDelegateModelItem; | - |
| 12 | class QQmlDelegateModelItemMetaType; | - |
| 13 | - | |
| 14 | class QQmlAdaptorModel : public QQmlStrongJSQObjectReference<QObject> | - |
| 15 | { | - |
| 16 | public: | - |
| 17 | class Accessors | - |
| 18 | { | - |
| 19 | public: | - |
| 20 | inline Accessors() {} | - |
| 21 | virtual ~Accessors(); | - |
| 22 | virtual int rowCount(const QQmlAdaptorModel &) const { return executed 1444 times by 12 tests: 0;return 0;Executed by:
executed 1444 times by 12 tests: }return 0;Executed by:
| 1444 |
| 23 | virtual int columnCount(const QQmlAdaptorModel &) const { return executed 102 times by 1 test: 0;return 0;Executed by:
executed 102 times by 1 test: }return 0;Executed by:
| 102 |
| 24 | virtual void cleanup(QQmlAdaptorModel &, QQmlDelegateModel * = nullptr) const {} | - |
| 25 | - | |
| 26 | virtual QVariant value(const QQmlAdaptorModel &, int, const QString &) const { | - |
| 27 | return never executed: QVariant();return QVariant();never executed: }return QVariant(); | 0 |
| 28 | - | |
| 29 | virtual QQmlDelegateModelItem *createItem( | - |
| 30 | QQmlAdaptorModel &, | - |
| 31 | QQmlDelegateModelItemMetaType *, | - |
| 32 | int) const { return never executed: nullptr;return nullptr;never executed: }return nullptr; | 0 |
| 33 | - | |
| 34 | virtual bool notify( | - |
| 35 | const QQmlAdaptorModel &, | - |
| 36 | const QList<QQmlDelegateModelItem *> &, | - |
| 37 | int, | - |
| 38 | int, | - |
| 39 | const QVector<int> &) const { return never executed: false;return false;never executed: }return false; | 0 |
| 40 | virtual void replaceWatchedRoles( | - |
| 41 | QQmlAdaptorModel &, | - |
| 42 | const QList<QByteArray> &, | - |
| 43 | const QList<QByteArray> &) const {} | - |
| 44 | virtual QVariant parentModelIndex(const QQmlAdaptorModel &) const { | - |
| 45 | return never executed: QVariant();return QVariant();never executed: }return QVariant(); | 0 |
| 46 | virtual QVariant modelIndex(const QQmlAdaptorModel &, int) const { | - |
| 47 | return never executed: QVariant();return QVariant();never executed: }return QVariant(); | 0 |
| 48 | virtual bool canFetchMore(const QQmlAdaptorModel &) const { return executed 3446 times by 24 tests: false;return false;Executed by:
executed 3446 times by 24 tests: }return false;Executed by:
| 3446 |
| 49 | virtual void fetchMore(QQmlAdaptorModel &) const {} | - |
| 50 | }; | - |
| 51 | - | |
| 52 | const Accessors *accessors; | - |
| 53 | QPersistentModelIndex rootIndex; | - |
| 54 | QQmlListAccessor list; | - |
| 55 | - | |
| 56 | QQmlAdaptorModel(); | - |
| 57 | ~QQmlAdaptorModel(); | - |
| 58 | - | |
| 59 | inline QVariant model() const { return executed 8 times by 1 test: list.list();return list.list();Executed by:
executed 8 times by 1 test: }return list.list();Executed by:
| 8 |
| 60 | void setModel(const QVariant &variant, QQmlDelegateModel *vdm, QQmlEngine *engine); | - |
| 61 | void invalidateModel(QQmlDelegateModel *vdm); | - |
| 62 | - | |
| 63 | bool isValid() const; | - |
| 64 | int count() const; | - |
| 65 | int rowCount() const; | - |
| 66 | int columnCount() const; | - |
| 67 | int rowAt(int index) const; | - |
| 68 | int columnAt(int index) const; | - |
| 69 | int indexAt(int row, int column) const; | - |
| 70 | - | |
| 71 | inline QAbstractItemModel *aim() { return executed 243663 times by 12 tests: static_cast<QAbstractItemModel *>(object());return static_cast<QAbstractItemModel *>(object());Executed by:
executed 243663 times by 12 tests: }return static_cast<QAbstractItemModel *>(object());Executed by:
| 243663 |
| 72 | inline const QAbstractItemModel *aim() const { return executed 278257 times by 12 tests: static_cast<const QAbstractItemModel *>(object());return static_cast<const QAbstractItemModel *>(object());Executed by:
executed 278257 times by 12 tests: }return static_cast<const QAbstractItemModel *>(object());Executed by:
| 278257 |
| 73 | - | |
| 74 | inline QVariant value(int index, const QString &role) const { | - |
| 75 | return executed 7412 times by 4 tests: accessors->value(*this, index, role);return accessors->value(*this, index, role);Executed by:
executed 7412 times by 4 tests: }return accessors->value(*this, index, role);Executed by:
| 7412 |
| 76 | inline QQmlDelegateModelItem *createItem(QQmlDelegateModelItemMetaType *metaType, int index) { | - |
| 77 | return executed 88455 times by 25 tests: accessors->createItem(*this, metaType, index);return accessors->createItem(*this, metaType, index);Executed by:
executed 88455 times by 25 tests: }return accessors->createItem(*this, metaType, index);Executed by:
| 88455 |
| 78 | inline bool hasProxyObject() const { | - |
| 79 | return executed 88407 times by 25 tests: list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty;return list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty;Executed by:
executed 88407 times by 25 tests: }return list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty;Executed by:
| 88407 |
| 80 | - | |
| 81 | inline bool notify( | - |
| 82 | const QList<QQmlDelegateModelItem *> &items, | - |
| 83 | int index, | - |
| 84 | int count, | - |
| 85 | const QVector<int> &roles) const { | - |
| 86 | return executed 494 times by 5 tests: accessors->notify(*this, items, index, count, roles);return accessors->notify(*this, items, index, count, roles);Executed by:
executed 494 times by 5 tests: }return accessors->notify(*this, items, index, count, roles);Executed by:
| 494 |
| 87 | inline void replaceWatchedRoles( | - |
| 88 | const QList<QByteArray> &oldRoles, const QList<QByteArray> &newRoles) { | - |
| 89 | accessors->replaceWatchedRoles(*this, oldRoles, newRoles); } executed 7078 times by 25 tests: end of blockExecuted by:
| 7078 |
| 90 | - | |
| 91 | inline QVariant modelIndex(int index) const { return executed 6 times by 2 tests: accessors->modelIndex(*this, index);return accessors->modelIndex(*this, index);Executed by:
executed 6 times by 2 tests: }return accessors->modelIndex(*this, index);Executed by:
| 6 |
| 92 | inline QVariant parentModelIndex() const { return executed 2 times by 1 test: accessors->parentModelIndex(*this);return accessors->parentModelIndex(*this);Executed by:
executed 2 times by 1 test: }return accessors->parentModelIndex(*this);Executed by:
| 2 |
| 93 | inline bool canFetchMore() const { return executed 14959 times by 27 tests: accessors->canFetchMore(*this);return accessors->canFetchMore(*this);Executed by:
executed 14959 times by 27 tests: }return accessors->canFetchMore(*this);Executed by:
| 14959 |
| 94 | inline void fetchMore() { return executed 18 times by 1 test: accessors->fetchMore(*this);return accessors->fetchMore(*this);Executed by:
executed 18 times by 1 test: }return accessors->fetchMore(*this);Executed by:
| 18 |
| 95 | - | |
| 96 | protected: | - |
| 97 | void objectDestroyed(QObject *) override; | - |
| 98 | }; | - |
| 99 | - | |
| 100 | class QQmlAdaptorModelProxyInterface | - |
| 101 | { | - |
| 102 | public: | - |
| 103 | virtual ~QQmlAdaptorModelProxyInterface() {} | - |
| 104 | - | |
| 105 | virtual QObject *proxiedObject() = 0; | - |
| 106 | }; | - |
| 107 | - | |
| 108 | - | |
| 109 | - | |
| 110 | template <> inline const char *qobject_interface_iid<QQmlAdaptorModelProxyInterface *>() { return "org.qt-project.Qt.QQmlAdaptorModelProxyInterface"; } template <> inline QQmlAdaptorModelProxyInterface *qobject_cast<QQmlAdaptorModelProxyInterface *>(QObject *object) { return reinterpret_cast<QQmlAdaptorModelProxyInterface *>((object ? object->qt_metacast("org.qt-project.Qt.QQmlAdaptorModelProxyInterface") : nullptr)); } template <> inline QQmlAdaptorModelProxyInterface *qobject_cast<QQmlAdaptorModelProxyInterface *>(const QObject *object) { return reinterpret_cast<QQmlAdaptorModelProxyInterface *>((object ? const_cast<QObject *>(object)->qt_metacast("org.qt-project.Qt.QQmlAdaptorModelProxyInterface") : nullptr)); } | - |
| 111 | - | |
| 112 | - | |
| Switch to Source code | Preprocessed file |