OpenCoverage

qquickopenglinfo.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickopenglinfo.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QQuickOpenGLInfo::QQuickOpenGLInfo(QQuickItem *item)-
4 : QObject(item)-
5 , m_window(nullptr)-
6 , m_majorVersion(2)-
7 , m_minorVersion(0)-
8 , m_profile(NoProfile)-
9 , m_renderableType(Unspecified)-
10{-
11 connect(item, qFlagLocation("2""windowChanged(QQuickWindow*)" "\0" __FILE__ ":" "78"), this, qFlagLocation("1""setWindow(QQuickWindow*)" "\0" __FILE__ ":" "78"));-
12 setWindow(item->window());-
13}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickopenglinfo
2
14int QQuickOpenGLInfo::majorVersion() const-
15{-
16 return
executed 2 times by 1 test: return m_majorVersion;
Executed by:
  • tst_qquickopenglinfo
m_majorVersion;
executed 2 times by 1 test: return m_majorVersion;
Executed by:
  • tst_qquickopenglinfo
2
17}-
18int QQuickOpenGLInfo::minorVersion() const-
19{-
20 return
executed 2 times by 1 test: return m_minorVersion;
Executed by:
  • tst_qquickopenglinfo
m_minorVersion;
executed 2 times by 1 test: return m_minorVersion;
Executed by:
  • tst_qquickopenglinfo
2
21}-
22QQuickOpenGLInfo::ContextProfile QQuickOpenGLInfo::profile() const-
23{-
24 return
executed 2 times by 1 test: return m_profile;
Executed by:
  • tst_qquickopenglinfo
m_profile;
executed 2 times by 1 test: return m_profile;
Executed by:
  • tst_qquickopenglinfo
2
25}-
26QQuickOpenGLInfo::RenderableType QQuickOpenGLInfo::renderableType() const-
27{-
28 return
executed 2 times by 1 test: return m_renderableType;
Executed by:
  • tst_qquickopenglinfo
m_renderableType;
executed 2 times by 1 test: return m_renderableType;
Executed by:
  • tst_qquickopenglinfo
2
29}-
30-
31QQuickOpenGLInfo *QQuickOpenGLInfo::qmlAttachedProperties(QObject *object)-
32{-
33 if (QQuickItem *item = qobject_cast<QQuickItem *>(object)
QQuickItem *it...tem *>(object)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
FALSEnever evaluated
)
0-2
34 return
executed 2 times by 1 test: return new QQuickOpenGLInfo(item);
Executed by:
  • tst_qquickopenglinfo
new QQuickOpenGLInfo(item);
executed 2 times by 1 test: return new QQuickOpenGLInfo(item);
Executed by:
  • tst_qquickopenglinfo
2
35 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
36}-
37-
38void QQuickOpenGLInfo::updateFormat()-
39{-
40 QOpenGLContext *context = nullptr;-
41 if (m_window
m_windowDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
)
2-4
42 context = m_window->openglContext();
executed 2 times by 1 test: context = m_window->openglContext();
Executed by:
  • tst_qquickopenglinfo
2
43 QSurfaceFormat format = context
contextDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
? context->format() : QSurfaceFormat::defaultFormat();
0-6
44-
45 if (m_majorVersion != format.majorVersion()
m_majorVersion...majorVersion()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
0-6
46 m_majorVersion = format.majorVersion();-
47 majorVersionChanged();-
48 }
never executed: end of block
0
49-
50 if (m_minorVersion != format.minorVersion()
m_minorVersion...minorVersion()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
0-6
51 m_minorVersion = format.minorVersion();-
52 minorVersionChanged();-
53 }
never executed: end of block
0
54-
55 ContextProfile profile = static_cast<ContextProfile>(format.profile());-
56 if (m_profile != profile
m_profile != profileDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
0-6
57 m_profile = profile;-
58 profileChanged();-
59 }
never executed: end of block
0
60-
61 RenderableType renderableType = static_cast<RenderableType>(format.renderableType());-
62 if (m_renderableType != renderableType
m_renderableTy...renderableTypeDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
0-6
63 m_renderableType = renderableType;-
64 renderableTypeChanged();-
65 }
never executed: end of block
0
66}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickopenglinfo
6
67-
68void QQuickOpenGLInfo::setWindow(QQuickWindow *window)-
69{-
70 if (m_window != window
m_window != windowDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
2-4
71 if (m_window
m_windowDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
2
72 disconnect(m_window, qFlagLocation("2""sceneGraphInitialized()" "\0" __FILE__ ":" "190"), this, qFlagLocation("1""updateFormat()" "\0" __FILE__ ":" "190"));-
73 disconnect(m_window, qFlagLocation("2""sceneGraphInvalidated()" "\0" __FILE__ ":" "191"), this, qFlagLocation("1""updateFormat()" "\0" __FILE__ ":" "191"));-
74 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickopenglinfo
2
75 if (window
windowDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickopenglinfo
) {
2
76 connect(window, qFlagLocation("2""sceneGraphInitialized()" "\0" __FILE__ ":" "194"), this, qFlagLocation("1""updateFormat()" "\0" __FILE__ ":" "194"));-
77 connect(window, qFlagLocation("2""sceneGraphInvalidated()" "\0" __FILE__ ":" "195"), this, qFlagLocation("1""updateFormat()" "\0" __FILE__ ":" "195"));-
78 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickopenglinfo
2
79 m_window = window;-
80 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickopenglinfo
4
81 updateFormat();-
82}
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickopenglinfo
6
83-
84-
85-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0