Chrysalis - CLO3D DevTools Extension Test Coverage


integrations/clo3d/extensions/dev-tools/
File: integrations/clo3d/extensions/dev-tools/src/LogLevelDelegate.cpp
Date: 2026-08-27 18:36:32
Lines:
0/22
0.0%
Functions:
0/5
0.0%
Branches:
0/32
0.0%
Decisions:
0/4
0.0%
Calls:
0/124
0.0%

Line Branch Decision Call Exec Source
1 #include "LogLevelDelegate.h"
2
3 #include <QTimer>
4 #include <QComboBox>
5
6 using namespace CLO3D::UI;
7
8
0/27
✗ 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 15 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ Call 19 not invoked.
✗ Call 22 not invoked.
✗ Call 25 not invoked.
✗ Call 26 not invoked.
✗ Call 27 not invoked.
✗ Call 28 not invoked.
✗ Call 29 not invoked.
✗ Call 30 not invoked.
✗ LogLevelDelegate::LogLevelDelegate(LoggerRegistryModel* model): QStyledItemDelegate(model), editors_(model->rowCount({})) {
9 ✗ static const auto prepareLevels = [] {
10
0/1
✗ Call 0 not invoked.
✗ QStringList levels;
11
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
✗ for (int i = 0; i < spdlog::level::n_levels; i++) {
12
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 8 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 15 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ Call 19 not invoked.
✗ Call 20 not invoked.
✗ Call 21 not invoked.
✗ Call 22 not invoked.
✗ levels << QString(spdlog::level::to_string_view(static_cast<spdlog::level::level_enum>(i)).data()).toUpper();
13 }
14 ✗ return levels;
15
0/1
✗ Call 0 not invoked.
✗ };
16
0/5
✗ Call 2 not invoked.
✗ Call 5 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 12 not invoked.
✗ static const QStringList LOG_LEVELS = prepareLevels();
17
18
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
0/13
✗ 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.
✗ for (auto& editor: editors_) {
19
0/4
✗ Call 0 not invoked.
✗ Call 3 not invoked.
✗ Call 6 not invoked.
✗ Call 9 not invoked.
✗ editor = new QComboBox();
20
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ editor->addItems(LOG_LEVELS);
21
0/6
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ editor->setFocusPolicy(Qt::NoFocus);
22 }
23
0/7
✗ 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.
✗ }
24
25 ✗ int LogLevelDelegate::getLevel(const int row) const {
26
0/11
✗ 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.
✗ return editors_[row]->currentIndex();
27 }
28
29 ✗ void LogLevelDelegate::setLevel(const int row, const int value) const {
30
0/11
✗ 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.
✗ editors_[row]->setCurrentIndex(value);
31 ✗ }
32
33 ✗ QWidget* LogLevelDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem&, const QModelIndex& index) const {
34
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.
✗ auto& editor = editors_[index.row()];
35
0/6
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ editor->setParent(parent);
36
0/1
✗ Call 0 not invoked.
✗ return editor;
37 }
38