OpenCoverage

qqmladaptormodel_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/util/qqmladaptormodel_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static_assert(bool(1 == 1), "Required feature " "qml_delegate_model" " for file " __FILE__ " not available.");-
5-
6-
7-
8class QQmlEngine;-
9-
10class QQmlDelegateModel;-
11class QQmlDelegateModelItem;-
12class QQmlDelegateModelItemMetaType;-
13-
14class QQmlAdaptorModel : public QQmlStrongJSQObjectReference<QObject>-
15{-
16public:-
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: return 0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
0;
executed 1444 times by 12 tests: return 0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
}
1444
23 virtual int columnCount(const QQmlAdaptorModel &) const { return
executed 102 times by 1 test: return 0;
Executed by:
  • tst_qquicktableview
0;
executed 102 times by 1 test: return 0;
Executed by:
  • tst_qquicktableview
}
102
24 virtual void cleanup(QQmlAdaptorModel &, QQmlDelegateModel * = nullptr) const {}-
25-
26 virtual QVariant value(const QQmlAdaptorModel &, int, const QString &) const {-
27 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
}
0
28-
29 virtual QQmlDelegateModelItem *createItem(-
30 QQmlAdaptorModel &,-
31 QQmlDelegateModelItemMetaType *,-
32 int) const { return
never executed: return nullptr;
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: return false;
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: return QVariant();
QVariant();
never executed: return QVariant();
}
0
46 virtual QVariant modelIndex(const QQmlAdaptorModel &, int) const {-
47 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
}
0
48 virtual bool canFetchMore(const QQmlAdaptorModel &) const { return
executed 3446 times by 24 tests: return false;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_scenegraph
false;
executed 3446 times by 24 tests: return false;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_scenegraph
}
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: return list.list();
Executed by:
  • tst_qquicklistview
list.list();
executed 8 times by 1 test: return list.list();
Executed by:
  • tst_qquicklistview
}
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: return static_cast<QAbstractItemModel *>(object());
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
static_cast<QAbstractItemModel *>(object());
executed 243663 times by 12 tests: return static_cast<QAbstractItemModel *>(object());
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}
243663
72 inline const QAbstractItemModel *aim() const { return
executed 278257 times by 12 tests: return static_cast<const QAbstractItemModel *>(object());
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
static_cast<const QAbstractItemModel *>(object());
executed 278257 times by 12 tests: return static_cast<const QAbstractItemModel *>(object());
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}
278257
73-
74 inline QVariant value(int index, const QString &role) const {-
75 return
executed 7412 times by 4 tests: return accessors->value(*this, index, role);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
accessors->value(*this, index, role);
executed 7412 times by 4 tests: return accessors->value(*this, index, role);
Executed by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
}
7412
76 inline QQmlDelegateModelItem *createItem(QQmlDelegateModelItemMetaType *metaType, int index) {-
77 return
executed 88455 times by 25 tests: return accessors->createItem(*this, metaType, index);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
accessors->createItem(*this, metaType, index);
executed 88455 times by 25 tests: return accessors->createItem(*this, metaType, index);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
}
88455
78 inline bool hasProxyObject() const {-
79 return
executed 88407 times by 25 tests: return list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty;
executed 88407 times by 25 tests: return list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
}
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: return accessors->notify(*this, items, index, count, roles);
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
accessors->notify(*this, items, index, count, roles);
executed 494 times by 5 tests: return accessors->notify(*this, items, index, count, roles);
Executed by:
  • tst_qqmllistmodel
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
}
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 block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
  • tst_scenegraph
7078
90-
91 inline QVariant modelIndex(int index) const { return
executed 6 times by 2 tests: return accessors->modelIndex(*this, index);
Executed by:
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
accessors->modelIndex(*this, index);
executed 6 times by 2 tests: return accessors->modelIndex(*this, index);
Executed by:
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
}
6
92 inline QVariant parentModelIndex() const { return
executed 2 times by 1 test: return accessors->parentModelIndex(*this);
Executed by:
  • tst_qquickvisualdatamodel
accessors->parentModelIndex(*this);
executed 2 times by 1 test: return accessors->parentModelIndex(*this);
Executed by:
  • tst_qquickvisualdatamodel
}
2
93 inline bool canFetchMore() const { return
executed 14959 times by 27 tests: return accessors->canFetchMore(*this);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • ...
accessors->canFetchMore(*this);
executed 14959 times by 27 tests: return accessors->canFetchMore(*this);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • ...
}
14959
94 inline void fetchMore() { return
executed 18 times by 1 test: return accessors->fetchMore(*this);
Executed by:
  • tst_qquicklistview
accessors->fetchMore(*this);
executed 18 times by 1 test: return accessors->fetchMore(*this);
Executed by:
  • tst_qquicklistview
}
18
95-
96protected:-
97 void objectDestroyed(QObject *) override;-
98};-
99-
100class QQmlAdaptorModelProxyInterface-
101{-
102public:-
103 virtual ~QQmlAdaptorModelProxyInterface() {}-
104-
105 virtual QObject *proxiedObject() = 0;-
106};-
107-
108-
109-
110template <> 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 codePreprocessed file

Generated by Squish Coco 4.2.0