Chrysalis - CLO3D Extensions Test Coverage


integrations/clo3d/
File: integrations/clo3d/include/BaseListModel.h
Date: 2026-08-27 18:36:08
Lines:
0/7
0.0%
Functions:
0/4
0.0%
Branches:
0/6
0.0%
Decisions:
0/2
0.0%
Calls:
0/40
0.0%

Line Branch Decision Call Exec Source
1 #ifndef CHRYSALIS_BASEMODEL_H
2 #define CHRYSALIS_BASEMODEL_H
3
4 #include <QMetaType>
5 #include <QAbstractListModel>
6
7 #include "Parameter.h"
8
9
0/3
✗ Call 0 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Q_DECLARE_METATYPE(Chrysalis::Parameter*)
10
11 namespace CLO3D::UI {
12 template<typename T>
13 class BaseModel: public QAbstractListModel {
14 protected:
15
0/10
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ explicit BaseModel(T* data): data_(data) {}
16 public:
17 ✗ int rowCount(const QModelIndex& parent) const override {
18
0/9
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ return data_->count();
19 }
20 ✗ QVariant data(const QModelIndex& index, const int role) const override {
21
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
0/1
✗ Call 2 not invoked.
✗ if (role != Qt::UserRole) return {};
22
0/17
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ return QVariant::fromValue((*data_)[index.row()]);
23 }
24 private:
25 T* data_;
26 };
27 }
28
29 #endif //CHRYSALIS_BASEMODEL_H
30