OpenCoverage

qquickscreen.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickscreen.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6QQuickScreenInfo::QQuickScreenInfo(QObject *parent, QScreen *wrappedScreen)-
7 : QObject(parent)-
8 , m_screen(wrappedScreen)-
9{-
10}
executed 52 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
11-
12QString QQuickScreenInfo::name() const-
13{-
14 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-2
15 return
never executed: return QString();
QString();
never executed: return QString();
0
16 return
executed 2 times by 1 test: return m_screen->name();
Executed by:
  • tst_qquickscreen
m_screen->name();
executed 2 times by 1 test: return m_screen->name();
Executed by:
  • tst_qquickscreen
2
17}-
18-
19QString QQuickScreenInfo::manufacturer() const-
20{-
21 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-2
22 return
never executed: return QString();
QString();
never executed: return QString();
0
23 return
executed 2 times by 1 test: return m_screen->manufacturer();
Executed by:
  • tst_qquickscreen
m_screen->manufacturer();
executed 2 times by 1 test: return m_screen->manufacturer();
Executed by:
  • tst_qquickscreen
2
24}-
25-
26QString QQuickScreenInfo::model() const-
27{-
28 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-2
29 return
never executed: return QString();
QString();
never executed: return QString();
0
30 return
executed 2 times by 1 test: return m_screen->model();
Executed by:
  • tst_qquickscreen
m_screen->model();
executed 2 times by 1 test: return m_screen->model();
Executed by:
  • tst_qquickscreen
2
31}-
32-
33QString QQuickScreenInfo::serialNumber() const-
34{-
35 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-2
36 return
never executed: return QString();
QString();
never executed: return QString();
0
37 return
executed 2 times by 1 test: return m_screen->serialNumber();
Executed by:
  • tst_qquickscreen
m_screen->serialNumber();
executed 2 times by 1 test: return m_screen->serialNumber();
Executed by:
  • tst_qquickscreen
2
38}-
39-
40int QQuickScreenInfo::width() const-
41{-
42 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-8
43 return
never executed: return 0;
0;
never executed: return 0;
0
44 return
executed 8 times by 1 test: return m_screen->size().width();
Executed by:
  • tst_qquickscreen
m_screen->size().width();
executed 8 times by 1 test: return m_screen->size().width();
Executed by:
  • tst_qquickscreen
8
45}-
46-
47int QQuickScreenInfo::height() const-
48{-
49 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-8
50 return
never executed: return 0;
0;
never executed: return 0;
0
51 return
executed 8 times by 1 test: return m_screen->size().height();
Executed by:
  • tst_qquickscreen
m_screen->size().height();
executed 8 times by 1 test: return m_screen->size().height();
Executed by:
  • tst_qquickscreen
8
52}-
53-
54int QQuickScreenInfo::desktopAvailableWidth() const-
55{-
56 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-2
57 return
never executed: return 0;
0;
never executed: return 0;
0
58 return
executed 2 times by 1 test: return m_screen->availableVirtualSize().width();
Executed by:
  • tst_qquickscreen
m_screen->availableVirtualSize().width();
executed 2 times by 1 test: return m_screen->availableVirtualSize().width();
Executed by:
  • tst_qquickscreen
2
59}-
60-
61int QQuickScreenInfo::desktopAvailableHeight() const-
62{-
63 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-2
64 return
never executed: return 0;
0;
never executed: return 0;
0
65 return
executed 2 times by 1 test: return m_screen->availableVirtualSize().height();
Executed by:
  • tst_qquickscreen
m_screen->availableVirtualSize().height();
executed 2 times by 1 test: return m_screen->availableVirtualSize().height();
Executed by:
  • tst_qquickscreen
2
66}-
67-
68qreal QQuickScreenInfo::logicalPixelDensity() const-
69{-
70 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
71 return
never executed: return 0.0;
0.0;
never executed: return 0.0;
0
72 return
never executed: return m_screen->logicalDotsPerInch() / 25.4;
m_screen->logicalDotsPerInch() / 25.4;
never executed: return m_screen->logicalDotsPerInch() / 25.4;
0
73}-
74-
75qreal QQuickScreenInfo::pixelDensity() const-
76{-
77 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 120 times by 1 test
Evaluated by:
  • tst_examples
)
0-120
78 return
never executed: return 0.0;
0.0;
never executed: return 0.0;
0
79 return
executed 120 times by 1 test: return m_screen->physicalDotsPerInch() / 25.4;
Executed by:
  • tst_examples
m_screen->physicalDotsPerInch() / 25.4;
executed 120 times by 1 test: return m_screen->physicalDotsPerInch() / 25.4;
Executed by:
  • tst_examples
120
80}-
81-
82qreal QQuickScreenInfo::devicePixelRatio() const-
83{-
84 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquickscreen
  • tst_scenegraph
)
0-16
85 return
never executed: return 1.0;
1.0;
never executed: return 1.0;
0
86 return
executed 16 times by 2 tests: return m_screen->devicePixelRatio();
Executed by:
  • tst_qquickscreen
  • tst_scenegraph
m_screen->devicePixelRatio();
executed 16 times by 2 tests: return m_screen->devicePixelRatio();
Executed by:
  • tst_qquickscreen
  • tst_scenegraph
16
87}-
88-
89Qt::ScreenOrientation QQuickScreenInfo::primaryOrientation() const-
90{-
91 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-6
92 return
never executed: return Qt::PrimaryOrientation;
Qt::PrimaryOrientation;
never executed: return Qt::PrimaryOrientation;
0
93 return
executed 6 times by 1 test: return m_screen->primaryOrientation();
Executed by:
  • tst_qquickscreen
m_screen->primaryOrientation();
executed 6 times by 1 test: return m_screen->primaryOrientation();
Executed by:
  • tst_qquickscreen
6
94}-
95-
96Qt::ScreenOrientation QQuickScreenInfo::orientation() const-
97{-
98 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-6
99 return
never executed: return Qt::PrimaryOrientation;
Qt::PrimaryOrientation;
never executed: return Qt::PrimaryOrientation;
0
100 return
executed 6 times by 1 test: return m_screen->orientation();
Executed by:
  • tst_qquickscreen
m_screen->orientation();
executed 6 times by 1 test: return m_screen->orientation();
Executed by:
  • tst_qquickscreen
6
101}-
102-
103int QQuickScreenInfo::virtualX() const-
104{-
105 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-8
106 return
never executed: return 0;
0;
never executed: return 0;
0
107 return
executed 8 times by 1 test: return m_screen->geometry().topLeft().x();
Executed by:
  • tst_qquickscreen
m_screen->geometry().topLeft().x();
executed 8 times by 1 test: return m_screen->geometry().topLeft().x();
Executed by:
  • tst_qquickscreen
8
108}-
109-
110int QQuickScreenInfo::virtualY() const-
111{-
112 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
0-8
113 return
never executed: return 0;
0;
never executed: return 0;
0
114 return
executed 8 times by 1 test: return m_screen->geometry().topLeft().y();
Executed by:
  • tst_qquickscreen
m_screen->geometry().topLeft().y();
executed 8 times by 1 test: return m_screen->geometry().topLeft().y();
Executed by:
  • tst_qquickscreen
8
115}-
116-
117void QQuickScreenInfo::setWrappedScreen(QScreen *screen)-
118{-
119 if (screen == m_screen
screen == m_screenDescription
TRUEnever evaluated
FALSEevaluated 90 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
)
0-90
120 return;
never executed: return;
0
121-
122 QScreen *oldScreen = m_screen;-
123 m_screen = screen;-
124-
125 if (oldScreen
oldScreenDescription
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
)
38-52
126 oldScreen->disconnect(this);
executed 38 times by 3 tests: oldScreen->disconnect(this);
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
38
127-
128 if (!screen
!screenDescription
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
)
38-52
129 return;
executed 38 times by 3 tests: return;
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
38
130-
131 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->geometry() != oldScreen->geometry()
screen->geomet...en->geometry()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-52
132 virtualXChanged();-
133 virtualYChanged();-
134 }
executed 52 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
135 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->size() != oldScreen->size()
screen->size()...Screen->size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-52
136 widthChanged();-
137 heightChanged();-
138 }
executed 52 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
139 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->name() != oldScreen->name()
screen->name()...Screen->name()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
140 nameChanged();
executed 52 times by 5 tests: nameChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
141 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->manufacturer() != oldScreen->manufacturer()
screen->manufa...manufacturer()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
142 manufacturerChanged();
executed 52 times by 5 tests: manufacturerChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
143 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->model() != oldScreen->model()
screen->model(...creen->model()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
144 modelChanged();
executed 52 times by 5 tests: modelChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
145 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->serialNumber() != oldScreen->serialNumber()
screen->serial...serialNumber()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
146 serialNumberChanged();
executed 52 times by 5 tests: serialNumberChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
147 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->orientation() != oldScreen->orientation()
screen->orient...>orientation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
148 orientationChanged();
executed 52 times by 5 tests: orientationChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
149 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->primaryOrientation() != oldScreen->primaryOrientation()
screen->primar...yOrientation()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
150 primaryOrientationChanged();
executed 52 times by 5 tests: primaryOrientationChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
151 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->availableVirtualGeometry() != oldScreen->availableVirtualGeometry()
screen->availa...tualGeometry()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
152 desktopGeometryChanged();
executed 52 times by 5 tests: desktopGeometryChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
153 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->logicalDotsPerInch() != oldScreen->logicalDotsPerInch()
screen->logica...lDotsPerInch()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
154 logicalPixelDensityChanged();
executed 52 times by 5 tests: logicalPixelDensityChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
155 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->physicalDotsPerInch() != oldScreen->physicalDotsPerInch()
screen->physic...lDotsPerInch()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
156 pixelDensityChanged();
executed 52 times by 5 tests: pixelDensityChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
157 if (!oldScreen
!oldScreenDescription
TRUEevaluated 52 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
|| screen->devicePixelRatio() != oldScreen->devicePixelRatio()
screen->device...cePixelRatio()Description
TRUEnever evaluated
FALSEnever evaluated
)
0-52
158 devicePixelRatioChanged();
executed 52 times by 5 tests: devicePixelRatioChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
159-
160 connect(screen, qFlagLocation("2""geometryChanged(QRect)" "\0" __FILE__ ":" "399"),-
161 this, qFlagLocation("2""widthChanged()" "\0" __FILE__ ":" "400"));-
162 connect(screen, qFlagLocation("2""geometryChanged(QRect)" "\0" __FILE__ ":" "401"),-
163 this, qFlagLocation("2""heightChanged()" "\0" __FILE__ ":" "402"));-
164 connect(screen, qFlagLocation("2""geometryChanged(QRect)" "\0" __FILE__ ":" "403"),-
165 this, qFlagLocation("2""virtualXChanged()" "\0" __FILE__ ":" "404"));-
166 connect(screen, qFlagLocation("2""geometryChanged(QRect)" "\0" __FILE__ ":" "405"),-
167 this, qFlagLocation("2""virtualYChanged()" "\0" __FILE__ ":" "406"));-
168 connect(screen, qFlagLocation("2""orientationChanged(Qt::ScreenOrientation)" "\0" __FILE__ ":" "407"),-
169 this, qFlagLocation("2""orientationChanged()" "\0" __FILE__ ":" "408"));-
170 connect(screen, qFlagLocation("2""primaryOrientationChanged(Qt::ScreenOrientation)" "\0" __FILE__ ":" "409"),-
171 this, qFlagLocation("2""primaryOrientationChanged()" "\0" __FILE__ ":" "410"));-
172 connect(screen, qFlagLocation("2""virtualGeometryChanged(QRect)" "\0" __FILE__ ":" "411"),-
173 this, qFlagLocation("2""desktopGeometryChanged()" "\0" __FILE__ ":" "412"));-
174 connect(screen, qFlagLocation("2""logicalDotsPerInchChanged(qreal)" "\0" __FILE__ ":" "413"),-
175 this, qFlagLocation("2""logicalPixelDensityChanged()" "\0" __FILE__ ":" "414"));-
176 connect(screen, qFlagLocation("2""physicalDotsPerInchChanged(qreal)" "\0" __FILE__ ":" "415"),-
177 this, qFlagLocation("2""pixelDensityChanged()" "\0" __FILE__ ":" "416"));-
178}
executed 52 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
  • tst_scenegraph
52
179-
180QScreen *QQuickScreenInfo::wrappedScreen() const-
181{-
182 return
never executed: return m_screen;
m_screen;
never executed: return m_screen;
0
183}-
184-
185QQuickScreenAttached::QQuickScreenAttached(QObject* attachee)-
186 : QQuickScreenInfo(attachee)-
187 , m_window(nullptr)-
188 , m_updateMask(nullptr)-
189 , m_updateMaskSet(false)-
190{-
191 m_attachee = qobject_cast<QQuickItem*>(attachee);-
192-
193 if (m_attachee
m_attacheeDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEnever evaluated
) {
0-40
194 QQuickItemPrivate::get(m_attachee)->extra.value().screenAttached = this;-
195-
196 if (m_attachee->window()
m_attachee->window()Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickscreen
  • tst_scenegraph
)
10-30
197 windowChanged(m_attachee->window());
executed 30 times by 1 test: windowChanged(m_attachee->window());
Executed by:
  • tst_examples
30
198 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
else {
40
199 QQuickWindow *window = qobject_cast<QQuickWindow*>(attachee);-
200 if (window
windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
201 windowChanged(window);
never executed: windowChanged(window);
0
202 }
never executed: end of block
0
203-
204 if (!m_screen
!m_screenDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_examples
)
10-30
205 screenChanged(QGuiApplication::primaryScreen());
executed 10 times by 2 tests: screenChanged(QGuiApplication::primaryScreen());
Executed by:
  • tst_qquickscreen
  • tst_scenegraph
10
206}
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
40
207-
208Qt::ScreenOrientations QQuickScreenAttached::orientationUpdateMask() const-
209{-
210 return
executed 6 times by 1 test: return m_updateMask;
Executed by:
  • tst_qquickscreen
m_updateMask;
executed 6 times by 1 test: return m_updateMask;
Executed by:
  • tst_qquickscreen
6
211}-
212-
213void QQuickScreenAttached::setOrientationUpdateMask(Qt::ScreenOrientations mask)-
214{-
215 m_updateMaskSet = true;-
216 if (m_updateMask == mask
m_updateMask == maskDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickscreen
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
)
2-4
217 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickscreen
4
218-
219 m_updateMask = mask;-
220-
221 if (m_screen
m_screenDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickscreen
FALSEnever evaluated
)
0-2
222 m_screen->setOrientationUpdateMask(m_updateMask);
executed 2 times by 1 test: m_screen->setOrientationUpdateMask(m_updateMask);
Executed by:
  • tst_qquickscreen
2
223-
224 orientationUpdateMaskChanged();-
225}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickscreen
2
226-
227int QQuickScreenAttached::angleBetween(int a, int b)-
228{-
229 if (!m_screen
!m_screenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
230 return
never executed: return Qt::PrimaryOrientation;
Qt::PrimaryOrientation;
never executed: return Qt::PrimaryOrientation;
0
231 return
never executed: return m_screen->angleBetween((Qt::ScreenOrientation)a,(Qt::ScreenOrientation)b);
m_screen->angleBetween((Qt::ScreenOrientation)a,(Qt::ScreenOrientation)b);
never executed: return m_screen->angleBetween((Qt::ScreenOrientation)a,(Qt::ScreenOrientation)b);
0
232}-
233-
234void QQuickScreenAttached::windowChanged(QQuickWindow* c)-
235{-
236 if (m_window
m_windowDescription
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
)
38
237 disconnect(m_window, qFlagLocation("2""screenChanged(QScreen*)" "\0" __FILE__ ":" "476"), this, qFlagLocation("1""screenChanged(QScreen*)" "\0" __FILE__ ":" "476"));
executed 38 times by 3 tests: disconnect(m_window, qFlagLocation("2""screenChanged(QScreen*)" "\0" __FILE__ ":" "476"), this, qFlagLocation("1""screenChanged(QScreen*)" "\0" __FILE__ ":" "476"));
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
38
238 m_window = c;-
239 screenChanged(c ? c->screen() : nullptr);-
240 if (c
cDescription
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
)
38
241 connect(c, qFlagLocation("2""screenChanged(QScreen*)" "\0" __FILE__ ":" "480"), this, qFlagLocation("1""screenChanged(QScreen*)" "\0" __FILE__ ":" "480"));
executed 38 times by 3 tests: connect(c, qFlagLocation("2""screenChanged(QScreen*)" "\0" __FILE__ ":" "480"), this, qFlagLocation("1""screenChanged(QScreen*)" "\0" __FILE__ ":" "480"));
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
38
242}
executed 76 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
76
243-
244void QQuickScreenAttached::screenChanged(QScreen *screen)-
245{-
246-
247 if (screen != m_screen
screen != m_screenDescription
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickscreen
  • tst_scenegraph
) {
8-78
248 setWrappedScreen(screen);-
249 if (!m_screen
!m_screenDescription
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
)
38-40
250 return;
executed 38 times by 3 tests: return;
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
38
251 if (m_updateMaskSet
m_updateMaskSetDescription
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
) {
0-40
252 m_screen->setOrientationUpdateMask(m_updateMask);-
253 }
never executed: end of block
else if (m_updateMask != m_screen->orientationUpdateMask()
m_updateMask !...onUpdateMask()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickscreen
FALSEevaluated 36 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
) {
0-36
254 m_updateMask = m_screen->orientationUpdateMask();-
255 orientationUpdateMaskChanged();-
256 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickscreen
4
257 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
40
258}
executed 48 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickscreen
  • tst_scenegraph
48
259-
260-
261-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0