Chrysalis - CLO3D Qt Designer plugin Test Coverage


integrations/clo3d/tools/qt-designer-plugin/
File: integrations/clo3d/tools/qt-designer-plugin/src/ContainerPlugin.cpp
Date: 2026-08-27 18:34:54
Lines:
0/20
0.0%
Functions:
0/6
0.0%
Branches:
0/48
0.0%
Decisions:
0/0
-%
Calls:
0/183
0.0%

Line Branch Decision Call Exec Source
1 #include "ContainerPlugin.h"
2
3 #include <QExtensionManager>
4 #include <QDesignerContainerExtension>
5 #include <QDesignerFormEditorInterface>
6
7 #include "ExtensionFactory.h"
8
9
10 using namespace CLO3D::UI;
11
12 static const QString basicWidget = R"(
13 <widget class="%1" name="%2">
14 %3
15 </widget>
16 )";
17
18 static const QString basicLayout = R"(
19 <layout class="%3" name="layout">
20 <property name="leftMargin"><number>0</number></property>
21 <property name="topMargin"><number>0</number></property>
22 <property name="rightMargin"><number>0</number></property>
23 <property name="bottomMargin"><number>0</number></property>
24 <property name="spacing"><number>0</number></property>
25 </layout>
26 )";
27
28 ✗ QString ContainerPlugin::group() const {
29
0/1
✗ Call 0 not invoked.
✗ return "Containers";
30 }
31
32 ✗ bool ContainerPlugin::isContainer() const {
33 ✗ return true;
34 }
35
36 ✗ QString ContainerPlugin::containerXml(const QString &objectName, const QString &layoutClassName) {
37
0/9
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ return containerXml("QWidget", objectName, layoutClassName);
38 }
39
40 ✗ QString ContainerPlugin::containerXml(const QString &className, const QString &objectName, const QString &layoutClassName) {
41
0/53
✗ 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 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 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.
✗ Call 23 not invoked.
✗ Call 24 not invoked.
✗ Call 25 not invoked.
✗ Call 28 not invoked.
✗ Call 29 not invoked.
✗ Call 30 not invoked.
✗ Call 33 not invoked.
✗ Call 34 not invoked.
✗ Call 35 not invoked.
✗ Call 36 not invoked.
✗ Call 37 not invoked.
✗ Call 38 not invoked.
✗ Call 39 not invoked.
✗ Call 40 not invoked.
✗ Call 41 not invoked.
✗ Call 42 not invoked.
✗ Call 43 not invoked.
✗ Call 44 not invoked.
✗ Call 45 not invoked.
✗ Call 46 not invoked.
✗ Call 47 not invoked.
✗ Call 48 not invoked.
✗ Call 49 not invoked.
✗ Call 50 not invoked.
✗ Call 51 not invoked.
✗ Call 52 not invoked.
✗ Call 53 not invoked.
✗ Call 54 not invoked.
✗ Call 55 not invoked.
✗ Call 56 not invoked.
✗ Call 57 not invoked.
✗ Call 58 not invoked.
✗ Call 59 not invoked.
✗ Call 60 not invoked.
✗ return basicWidget.arg(className).arg(objectName).arg(basicLayout.arg(layoutClassName));
42 }
43
44 ✗ QString ContainerPlugin::domXml() const {
45
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.
✗ const auto className = name();
46
0/2
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ auto objectName = className;
47
0/1
✗ Call 0 not invoked.
✗ objectName.remove(0, 4); // remove namespace
48
0/12
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ Call 19 not invoked.
✗ objectName[0] = objectName[0].toLower(); // start objectName in lower case
49
0/61
✗ 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 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 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.
✗ Call 23 not invoked.
✗ Call 24 not invoked.
✗ Call 25 not invoked.
✗ Call 28 not invoked.
✗ Call 29 not invoked.
✗ Call 32 not invoked.
✗ Call 33 not invoked.
✗ Call 36 not invoked.
✗ Call 37 not invoked.
✗ Call 38 not invoked.
✗ Call 41 not invoked.
✗ Call 42 not invoked.
✗ Call 43 not invoked.
✗ Call 44 not invoked.
✗ Call 45 not invoked.
✗ Call 46 not invoked.
✗ Call 47 not invoked.
✗ Call 48 not invoked.
✗ Call 49 not invoked.
✗ Call 50 not invoked.
✗ Call 51 not invoked.
✗ Call 52 not invoked.
✗ Call 53 not invoked.
✗ Call 54 not invoked.
✗ Call 55 not invoked.
✗ Call 56 not invoked.
✗ Call 57 not invoked.
✗ Call 58 not invoked.
✗ Call 59 not invoked.
✗ Call 60 not invoked.
✗ Call 61 not invoked.
✗ Call 62 not invoked.
✗ Call 63 not invoked.
✗ Call 64 not invoked.
✗ Call 65 not invoked.
✗ Call 66 not invoked.
✗ Call 67 not invoked.
✗ Call 68 not invoked.
✗ Call 69 not invoked.
✗ Call 70 not invoked.
✗ Call 71 not invoked.
✗ Call 72 not invoked.
✗ return basicWidget.arg(className).arg(objectName).arg(domXmlContent().join("\n"));
50
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ }
51
52 ✗ void ContainerPlugin::initialize(QDesignerFormEditorInterface *core) {
53
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ WidgetPlugin::initialize(core);
54
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ const auto manager = core->extensionManager();
55
0/24
✗ 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 12 not invoked.
✗ Call 13 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 22 not invoked.
✗ Call 23 not invoked.
✗ Call 24 not invoked.
✗ Call 27 not invoked.
✗ Call 28 not invoked.
✗ Call 29 not invoked.
✗ Call 32 not invoked.
✗ Call 33 not invoked.
✗ Call 34 not invoked.
✗ Call 35 not invoked.
✗ manager->registerExtensions(new ExtensionFactory(manager), Q_TYPEID(QDesignerContainerExtension));
56 ✗ }
57