OpenCoverage

qquickimage.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickimage.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7class QQuickImageTextureProvider : public QSGTextureProvider-
8{-
9 public:-
10#pragma GCC diagnostic push-
11 -
12#pragma GCC diagnostic ignored "-Wsuggest-override"-
13 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
14#pragma GCC diagnostic ignored "-Wattributes"-
15 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
16#pragma GCC diagnostic pop-
17 struct QPrivateSignal {};-
18public:-
19 QQuickImageTextureProvider()-
20 : m_texture(nullptr)-
21 , m_smooth(false)-
22 {-
23 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
4
24-
25 void updateTexture(QSGTexture *texture) {-
26 if (m_texture == texture
m_texture == textureDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
)
4
27 return;
executed 4 times by 2 tests: return;
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
4
28 m_texture = texture;-
29 textureChanged();-
30 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
4
31-
32 QSGTexture *texture() const override {-
33 if (m_texture
m_textureDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
FALSEnever evaluated
) {
0-16
34 m_texture->setFiltering(m_smooth ? QSGTexture::Linear : QSGTexture::Nearest);-
35 m_texture->setMipmapFiltering(m_mipmap ? QSGTexture::Linear : QSGTexture::None);-
36 m_texture->setHorizontalWrapMode(QSGTexture::ClampToEdge);-
37 m_texture->setVerticalWrapMode(QSGTexture::ClampToEdge);-
38 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
16
39 return
executed 16 times by 2 tests: return m_texture;
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
m_texture;
executed 16 times by 2 tests: return m_texture;
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
16
40 }-
41-
42 friend class QQuickImage;-
43-
44 QSGTexture *m_texture;-
45 bool m_smooth;-
46 bool m_mipmap;-
47};-
48-
49-
50QQuickImagePrivate::QQuickImagePrivate()-
51 : fillMode(QQuickImage::Stretch)-
52 , paintedWidth(0)-
53 , paintedHeight(0)-
54 , pixmapChanged(false)-
55 , mipmap(false)-
56 , hAlign(QQuickImage::AlignHCenter)-
57 , vAlign(QQuickImage::AlignVCenter)-
58 , provider(nullptr)-
59{-
60}
executed 5486 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
5486
61QQuickImage::QQuickImage(QQuickItem *parent)-
62 : QQuickImageBase(*(new QQuickImagePrivate), parent)-
63{-
64}
executed 5396 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
5396
65-
66QQuickImage::QQuickImage(QQuickImagePrivate &dd, QQuickItem *parent)-
67 : QQuickImageBase(dd, parent)-
68{-
69}
executed 90 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
90
70-
71QQuickImage::~QQuickImage()-
72{-
73 QQuickImagePrivate * const d = d_func();-
74 if (d->provider
d->providerDescription
TRUEnever evaluated
FALSEevaluated 4208 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
) {
0-4208
75-
76-
77 QQuickWindowQObjectCleanupJob::schedule(window(), d->provider);-
78 }
never executed: end of block
0
79}
executed 4208 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
4208
80-
81void QQuickImagePrivate::setImage(const QImage &image)-
82{-
83 QQuickImage * const q = q_func();-
84 pix.setImage(image);-
85-
86 q->pixmapChange();-
87 status = pix.isNull()
pix.isNull()Description
TRUEevaluated 188 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
FALSEnever evaluated
? QQuickImageBase::Null : QQuickImageBase::Ready;
0-188
88-
89 q->update();-
90}
executed 188 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
188
91-
92void QQuickImagePrivate::setPixmap(const QQuickPixmap &pixmap)-
93{-
94 QQuickImage * const q = q_func();-
95 pix.setPixmap(pixmap);-
96-
97 q->pixmapChange();-
98 status = pix.isNull()
pix.isNull()Description
TRUEnever evaluated
FALSEevaluated 404 times by 1 test
Evaluated by:
  • tst_qquickanimatedimage
? QQuickImageBase::Null : QQuickImageBase::Ready;
0-404
99-
100 q->update();-
101}
executed 404 times by 1 test: end of block
Executed by:
  • tst_qquickanimatedimage
404
102QQuickImage::FillMode QQuickImage::fillMode() const-
103{-
104 const QQuickImagePrivate * const d = d_func();-
105 return
executed 98 times by 2 tests: return d->fillMode;
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
d->fillMode;
executed 98 times by 2 tests: return d->fillMode;
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
98
106}-
107-
108void QQuickImage::setFillMode(FillMode mode)-
109{-
110 QQuickImagePrivate * const d = d_func();-
111 if (d->fillMode == mode
d->fillMode == modeDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 106 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
)
12-106
112 return;
executed 12 times by 1 test: return;
Executed by:
  • tst_qquickimage
12
113 d->fillMode = mode;-
114 if ((
(mode == Prese...ectRatioCrop()Description
TRUEevaluated 26 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
mode == PreserveAspectCrop) != d->providerOptions.preserveAspectRatioCrop()
(mode == Prese...ectRatioCrop()Description
TRUEevaluated 26 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
) {
26-80
115 d->providerOptions.setPreserveAspectRatioCrop(mode == PreserveAspectCrop);-
116 if (isComponentComplete()
isComponentComplete()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 22 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
)
4-22
117 load();
executed 4 times by 1 test: load();
Executed by:
  • tst_qquickimage
4
118 }
executed 26 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
else if ((
(mode == Prese...pectRatioFit()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
mode == PreserveAspectFit) != d->providerOptions.preserveAspectRatioFit()
(mode == Prese...pectRatioFit()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 52 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
) {
26-52
119 d->providerOptions.setPreserveAspectRatioFit(mode == PreserveAspectFit);-
120 if (isComponentComplete()
isComponentComplete()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
)
4-24
121 load();
executed 4 times by 1 test: load();
Executed by:
  • tst_qquickimage
4
122 }
executed 28 times by 2 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_sharedimage
28
123 update();-
124 updatePaintedGeometry();-
125 fillModeChanged();-
126}
executed 106 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
106
127qreal QQuickImage::paintedWidth() const-
128{-
129 const QQuickImagePrivate * const d = d_func();-
130 return
executed 116 times by 1 test: return d->paintedWidth;
Executed by:
  • tst_qquickimage
d->paintedWidth;
executed 116 times by 1 test: return d->paintedWidth;
Executed by:
  • tst_qquickimage
116
131}-
132-
133qreal QQuickImage::paintedHeight() const-
134{-
135 const QQuickImagePrivate * const d = d_func();-
136 return
executed 116 times by 1 test: return d->paintedHeight;
Executed by:
  • tst_qquickimage
d->paintedHeight;
executed 116 times by 1 test: return d->paintedHeight;
Executed by:
  • tst_qquickimage
116
137}-
138void QQuickImage::updatePaintedGeometry()-
139{-
140 QQuickImagePrivate * const d = d_func();-
141-
142 if (d->fillMode == PreserveAspectFit
d->fillMode ==...serveAspectFitDescription
TRUEevaluated 96 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 13850 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
) {
96-13850
143 if (!d->pix.width()
!d->pix.width()Description
TRUEevaluated 36 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
|| !d->pix.height()
!d->pix.height()Description
TRUEnever evaluated
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
) {
0-60
144 setImplicitSize(0, 0);-
145 return;
executed 36 times by 2 tests: return;
Executed by:
  • tst_qquickimage
  • tst_sharedimage
36
146 }-
147 const qreal pixWidth = d->pix.width() / d->devicePixelRatio;-
148 const qreal pixHeight = d->pix.height() / d->devicePixelRatio;-
149 const qreal w = widthValid()
widthValid()Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 38 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
? width() : pixWidth;
22-38
150 const qreal widthScale = w / pixWidth;-
151 const qreal h = heightValid()
heightValid()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
? height() : pixHeight;
24-36
152 const qreal heightScale = h / pixHeight;-
153 if (widthScale <= heightScale
widthScale <= heightScaleDescription
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickimage
) {
20-40
154 d->paintedWidth = w;-
155 d->paintedHeight = widthScale * pixHeight;-
156 }
executed 40 times by 2 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_sharedimage
else if (heightScale < widthScale
heightScale < widthScaleDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEnever evaluated
) {
0-40
157 d->paintedWidth = heightScale * pixWidth;-
158 d->paintedHeight = h;-
159 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_qquickimage
20
160 const qreal iHeight = (widthValid()
widthValid()Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 38 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
&& !heightValid()
!heightValid()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickimage
) ? d->paintedHeight : pixHeight;
10-38
161 const qreal iWidth = (heightValid()
heightValid()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
&& !widthValid()
!widthValid()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickimage
) ? d->paintedWidth : pixWidth;
10-36
162 setImplicitSize(iWidth, iHeight);-
163-
164 }
executed 60 times by 2 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_sharedimage
else if (d->fillMode == PreserveAspectCrop
d->fillMode ==...erveAspectCropDescription
TRUEevaluated 90 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 13760 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
) {
60-13760
165 if (!d->pix.width()
!d->pix.width()Description
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 50 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
|| !d->pix.height()
!d->pix.height()Description
TRUEnever evaluated
FALSEevaluated 50 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
)
0-50
166 return;
executed 40 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquickimage
40
167 const qreal pixWidth = d->pix.width() / d->devicePixelRatio;-
168 const qreal pixHeight = d->pix.height() / d->devicePixelRatio;-
169 qreal widthScale = width() / pixWidth;-
170 qreal heightScale = height() / pixHeight;-
171 if (widthScale < heightScale
widthScale < heightScaleDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
) {
20-30
172 widthScale = heightScale;-
173 }
executed 20 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
else if (heightScale < widthScale
heightScale < widthScaleDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickimage
) {
8-22
174 heightScale = widthScale;-
175 }
executed 22 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
22
176-
177 d->paintedHeight = heightScale * pixHeight;-
178 d->paintedWidth = widthScale * pixWidth;-
179 }
executed 50 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
else if (d->fillMode == Pad
d->fillMode == PadDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 13754 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
) {
6-13754
180 d->paintedWidth = d->pix.width() / d->devicePixelRatio;-
181 d->paintedHeight = d->pix.height() / d->devicePixelRatio;-
182 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickimage
else {
6
183 d->paintedWidth = width();-
184 d->paintedHeight = height();-
185 }
executed 13754 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
13754
186 paintedGeometryChanged();-
187}
executed 13870 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
13870
188-
189void QQuickImage::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)-
190{-
191 QQuickImageBase::geometryChanged(newGeometry, oldGeometry);-
192 if (newGeometry.size() != oldGeometry.size()
newGeometry.si...eometry.size()Description
TRUEevaluated 7834 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
FALSEevaluated 11902 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_scenegraph
)
7834-11902
193 updatePaintedGeometry();
executed 7834 times by 11 tests: updatePaintedGeometry();
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
7834
194}
executed 19736 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
19736
195-
196QRectF QQuickImage::boundingRect() const-
197{-
198 const QQuickImagePrivate * const d = d_func();-
199 return
executed 96 times by 1 test: return QRectF(0, 0, qMax(width(), d->paintedWidth), qMax(height(), d->paintedHeight));
Executed by:
  • tst_qquickimage
QRectF(0, 0, qMax(width(), d->paintedWidth), qMax(height(), d->paintedHeight));
executed 96 times by 1 test: return QRectF(0, 0, qMax(width(), d->paintedWidth), qMax(height(), d->paintedHeight));
Executed by:
  • tst_qquickimage
96
200}-
201-
202QSGTextureProvider *QQuickImage::textureProvider() const-
203{-
204 const QQuickImagePrivate * const d = d_func();-
205-
206-
207-
208-
209-
210 if (QQuickItem::isTextureProvider()
QQuickItem::is...tureProvider()Description
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
)
0-4
211 return
never executed: return QQuickItem::textureProvider();
QQuickItem::textureProvider();
never executed: return QQuickItem::textureProvider();
0
212-
213 if (!d->window
!d->windowDescription
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
|| !d->sceneGraphRenderContext()
!d->sceneGraphRenderContext()Description
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
|| QThread::currentThread() != d->sceneGraphRenderContext()->thread()
QThread::curre...xt()->thread()Description
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
) {
0-4
214 QMessageLogger(__FILE__, 627, __PRETTY_FUNCTION__).warning("QQuickImage::textureProvider: can only be queried on the rendering thread of an exposed window");-
215 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
216 }-
217-
218 if (!d->provider
!d->providerDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
FALSEnever evaluated
) {
0-4
219 QQuickImagePrivate *dd = const_cast<QQuickImagePrivate *>(d);-
220 dd->provider = new QQuickImageTextureProvider;-
221 dd->provider->m_smooth = d->smooth;-
222 dd->provider->m_mipmap = d->mipmap;-
223 dd->provider->updateTexture(d->sceneGraphRenderContext()->textureForFactory(d->pix.textureFactory(), window()));-
224 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
4
225-
226 return
executed 4 times by 2 tests: return d->provider;
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
d->provider;
executed 4 times by 2 tests: return d->provider;
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
4
227}-
228-
229void QQuickImage::invalidateSceneGraph()-
230{-
231 QQuickImagePrivate * const d = d_func();-
232 delete d->provider;-
233 d->provider = nullptr;-
234}
executed 86 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
86
235-
236void QQuickImage::releaseResources()-
237{-
238 QQuickImagePrivate * const d = d_func();-
239 if (d->provider
d->providerDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickshadereffect
FALSEevaluated 4040 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
2-4040
240 QQuickWindowQObjectCleanupJob::schedule(window(), d->provider);-
241 d->provider = nullptr;-
242 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickshadereffect
2
243}
executed 4042 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
4042
244-
245QSGNode *QQuickImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)-
246{-
247 QQuickImagePrivate * const d = d_func();-
248-
249 QSGTexture *texture = d->sceneGraphRenderContext()->textureForFactory(d->pix.textureFactory(), window());-
250-
251-
252 if (d->provider
d->providerDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
FALSEevaluated 5185 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
4-5185
253 d->provider->m_smooth = d->smooth;-
254 d->provider->m_mipmap = d->mipmap;-
255 d->provider->updateTexture(texture);-
256 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickshadereffect
4
257-
258 if (!texture
!textureDescription
TRUEevaluated 102 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 5087 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| width() <= 0
width() <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| height() <= 0
height() <= 0Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
0-5087
259 delete oldNode;-
260 return
executed 104 times by 2 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qquickimage
nullptr;
executed 104 times by 2 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qquickimage
104
261 }-
262-
263 QSGInternalImageNode *node = static_cast<QSGInternalImageNode *>(oldNode);-
264 if (!node
!nodeDescription
TRUEevaluated 5025 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 60 times by 2 tests
Evaluated by:
  • tst_qquickanimatedimage
  • tst_qquickimage
) {
60-5025
265 d->pixmapChanged = true;-
266 node = d->sceneGraphContext()->createInternalImageNode();-
267 }
executed 5025 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5025
268-
269 QRectF targetRect;-
270 QRectF sourceRect;-
271 QSGTexture::WrapMode hWrap = QSGTexture::ClampToEdge;-
272 QSGTexture::WrapMode vWrap = QSGTexture::ClampToEdge;-
273-
274 qreal pixWidth = (
(d->fillMode =...erveAspectFit)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5083 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
d->fillMode == PreserveAspectFit)
(d->fillMode =...erveAspectFit)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5083 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
? d->paintedWidth : d->pix.width() / d->devicePixelRatio;
2-5083
275 qreal pixHeight = (
(d->fillMode =...erveAspectFit)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5083 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
d->fillMode == PreserveAspectFit)
(d->fillMode =...erveAspectFit)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5083 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
? d->paintedHeight : d->pix.height() / d->devicePixelRatio;
2-5083
276-
277 int xOffset = 0;-
278 if (d->hAlign == QQuickImage::AlignHCenter
d->hAlign == Q...::AlignHCenterDescription
TRUEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEnever evaluated
)
0-5085
279 xOffset = qCeil((width() - pixWidth) / 2.);
executed 5085 times by 8 tests: xOffset = qCeil((width() - pixWidth) / 2.);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5085
280 else if (d->hAlign == QQuickImage::AlignRight
d->hAlign == Q...ge::AlignRightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
281 xOffset = qCeil(width() - pixWidth);
never executed: xOffset = qCeil(width() - pixWidth);
0
282-
283 int yOffset = 0;-
284 if (d->vAlign == QQuickImage::AlignVCenter
d->vAlign == Q...::AlignVCenterDescription
TRUEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEnever evaluated
)
0-5085
285 yOffset = qCeil((height() - pixHeight) / 2.);
executed 5085 times by 8 tests: yOffset = qCeil((height() - pixHeight) / 2.);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5085
286 else if (d->vAlign == QQuickImage::AlignBottom
d->vAlign == Q...e::AlignBottomDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
287 yOffset = qCeil(height() - pixHeight);
never executed: yOffset = qCeil(height() - pixHeight);
0
288-
289 switch (d->fillMode) {-
290 default
never executed: default:
:
never executed: default:
0
291 case
executed 5053 times by 8 tests: case Stretch:
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
Stretch:
executed 5053 times by 8 tests: case Stretch:
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5053
292 targetRect = QRectF(0, 0, width(), height());-
293 sourceRect = d->pix.rect();-
294 break;
executed 5053 times by 8 tests: break;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5053
295-
296 case
executed 2 times by 1 test: case PreserveAspectFit:
Executed by:
  • tst_qquickimage
PreserveAspectFit:
executed 2 times by 1 test: case PreserveAspectFit:
Executed by:
  • tst_qquickimage
2
297 targetRect = QRectF(xOffset, yOffset, d->paintedWidth, d->paintedHeight);-
298 sourceRect = d->pix.rect();-
299 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquickimage
2
300-
301 case
executed 16 times by 2 tests: case PreserveAspectCrop:
Executed by:
  • tst_examples
  • tst_qquickimage
PreserveAspectCrop:
executed 16 times by 2 tests: case PreserveAspectCrop:
Executed by:
  • tst_examples
  • tst_qquickimage
{
16
302 targetRect = QRect(0, 0, width(), height());-
303 qreal wscale = width() / qreal(d->pix.width());-
304 qreal hscale = height() / qreal(d->pix.height());-
305-
306 if (wscale > hscale
wscale > hscaleDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
) {
4-12
307 int src = (hscale / wscale) * qreal(d->pix.height());-
308 int y = 0;-
309 if (d->vAlign == QQuickImage::AlignVCenter
d->vAlign == Q...::AlignVCenterDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEnever evaluated
)
0-4
310 y = qCeil((d->pix.height() - src) / 2.);
executed 4 times by 2 tests: y = qCeil((d->pix.height() - src) / 2.);
Executed by:
  • tst_examples
  • tst_qquickimage
4
311 else if (d->vAlign == QQuickImage::AlignBottom
d->vAlign == Q...e::AlignBottomDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
312 y = qCeil(d->pix.height() - src);
never executed: y = qCeil(d->pix.height() - src);
0
313 sourceRect = QRectF(0, y, d->pix.width(), src);-
314-
315 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
else {
4
316 int src = (wscale / hscale) * qreal(d->pix.width());-
317 int x = 0;-
318 if (d->hAlign == QQuickImage::AlignHCenter
d->hAlign == Q...::AlignHCenterDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_examples
FALSEnever evaluated
)
0-12
319 x = qCeil((d->pix.width() - src) / 2.);
executed 12 times by 1 test: x = qCeil((d->pix.width() - src) / 2.);
Executed by:
  • tst_examples
12
320 else if (d->hAlign == QQuickImage::AlignRight
d->hAlign == Q...ge::AlignRightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
321 x = qCeil(d->pix.width() - src);
never executed: x = qCeil(d->pix.width() - src);
0
322 sourceRect = QRectF(x, 0, src, d->pix.height());-
323 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_examples
12
324 }-
325 break;
executed 16 times by 2 tests: break;
Executed by:
  • tst_examples
  • tst_qquickimage
16
326-
327 case
executed 2 times by 1 test: case Tile:
Executed by:
  • tst_qquickimage
Tile:
executed 2 times by 1 test: case Tile:
Executed by:
  • tst_qquickimage
2
328 targetRect = QRectF(0, 0, width(), height());-
329 sourceRect = QRectF(-xOffset, -yOffset, width(), height());-
330 hWrap = QSGTexture::Repeat;-
331 vWrap = QSGTexture::Repeat;-
332 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquickimage
2
333-
334 case
executed 6 times by 2 tests: case TileHorizontally:
Executed by:
  • tst_examples
  • tst_qquickimage
TileHorizontally:
executed 6 times by 2 tests: case TileHorizontally:
Executed by:
  • tst_examples
  • tst_qquickimage
6
335 targetRect = QRectF(0, 0, width(), height());-
336 sourceRect = QRectF(-xOffset, 0, width(), d->pix.height());-
337 hWrap = QSGTexture::Repeat;-
338 break;
executed 6 times by 2 tests: break;
Executed by:
  • tst_examples
  • tst_qquickimage
6
339-
340 case
executed 4 times by 1 test: case TileVertically:
Executed by:
  • tst_qquickimage
TileVertically:
executed 4 times by 1 test: case TileVertically:
Executed by:
  • tst_qquickimage
4
341 targetRect = QRectF(0, 0, width(), height());-
342 sourceRect = QRectF(0, -yOffset, d->pix.width(), height());-
343 vWrap = QSGTexture::Repeat;-
344 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickimage
4
345-
346 case
executed 2 times by 1 test: case Pad:
Executed by:
  • tst_qquickimage
Pad:
executed 2 times by 1 test: case Pad:
Executed by:
  • tst_qquickimage
2
347 qreal w = qMin(qreal(pixWidth), width());-
348 qreal h = qMin(qreal(pixHeight), height());-
349 qreal x = (
(pixWidth > width())Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
pixWidth > width())
(pixWidth > width())Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
? -xOffset : 0;
0-2
350 qreal y = (
(pixHeight > height())Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
pixHeight > height())
(pixHeight > height())Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
? -yOffset : 0;
0-2
351 targetRect = QRectF(x + xOffset, y + yOffset, w, h);-
352 sourceRect = QRectF(x, y, w, h);-
353 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquickimage
2
354 };-
355-
356 qreal nsWidth = (hWrap == QSGTexture::Repeat
hWrap == QSGTexture::RepeatDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
FALSEevaluated 5077 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| d->fillMode == Pad
d->fillMode == PadDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5075 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) ? d->pix.width() / d->devicePixelRatio : d->pix.width();
2-5077
357 qreal nsHeight = (vWrap == QSGTexture::Repeat
vWrap == QSGTexture::RepeatDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5079 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| d->fillMode == Pad
d->fillMode == PadDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 5077 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) ? d->pix.height() / d->devicePixelRatio : d->pix.height();
2-5079
358 QRectF nsrect(sourceRect.x() / nsWidth,-
359 sourceRect.y() / nsHeight,-
360 sourceRect.width() / nsWidth,-
361 sourceRect.height() / nsHeight);-
362-
363 if (targetRect.isEmpty()
targetRect.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-5085
364 || !qt_is_finite(targetRect.width())
!qt_is_finite(...tRect.width())Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| !qt_is_finite(targetRect.height())
!qt_is_finite(...Rect.height())Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-5085
365 || nsrect.isEmpty()
nsrect.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-5085
366 || !qt_is_finite(nsrect.width())
!qt_is_finite(nsrect.width())Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| !qt_is_finite(nsrect.height())
!qt_is_finite(nsrect.height())Description
TRUEnever evaluated
FALSEevaluated 5085 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
) {
0-5085
367 delete node;-
368 return
never executed: return nullptr;
nullptr;
never executed: return nullptr;
0
369 }-
370-
371 if (d->pixmapChanged
d->pixmapChangedDescription
TRUEevaluated 5081 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickanimatedimage
) {
4-5081
372-
373-
374 if (texture->isAtlasTexture()
texture->isAtlasTexture()Description
TRUEevaluated 4935 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 146 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
&& (hWrap == QSGTexture::Repeat
hWrap == QSGTexture::RepeatDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 4929 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| vWrap == QSGTexture::Repeat
vWrap == QSGTexture::RepeatDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 4925 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
|| d->mipmap
d->mipmapDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_scenegraph
FALSEevaluated 4923 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
))
2-4935
375 node->setTexture(texture->removedFromAtlas());
executed 12 times by 2 tests: node->setTexture(texture->removedFromAtlas());
Executed by:
  • tst_qquickimage
  • tst_scenegraph
12
376 else-
377 node->setTexture(texture);
executed 5069 times by 8 tests: node->setTexture(texture);
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5069
378 d->pixmapChanged = false;-
379 }
executed 5081 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5081
380-
381 node->setMipmapFiltering(d->mipmap ? QSGTexture::Linear : QSGTexture::None);-
382 node->setHorizontalWrapMode(hWrap);-
383 node->setVerticalWrapMode(vWrap);-
384 node->setFiltering(d->smooth ? QSGTexture::Linear : QSGTexture::Nearest);-
385-
386 node->setTargetRect(targetRect);-
387 node->setInnerTargetRect(targetRect);-
388 node->setSubSourceRect(nsrect);-
389 node->setMirror(d->mirror);-
390 node->setAntialiasing(d->antialiasing);-
391 node->update();-
392-
393 return
executed 5085 times by 8 tests: return node;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
node;
executed 5085 times by 8 tests: return node;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5085
394}-
395-
396void QQuickImage::pixmapChange()-
397{-
398 QQuickImagePrivate * const d = d_func();-
399-
400-
401-
402-
403 if (d->fillMode != PreserveAspectFit
d->fillMode !=...serveAspectFitDescription
TRUEevaluated 5980 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_sharedimage
)
26-5980
404 QQuickImageBase::pixmapChange();
executed 5980 times by 11 tests: QQuickImageBase::pixmapChange();
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
5980
405 updatePaintedGeometry();-
406 d->pixmapChanged = true;-
407-
408-
409 update();-
410}
executed 6006 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
6006
411-
412QQuickImage::VAlignment QQuickImage::verticalAlignment() const-
413{-
414 const QQuickImagePrivate * const d = d_func();-
415 return
never executed: return d->vAlign;
d->vAlign;
never executed: return d->vAlign;
0
416}-
417-
418void QQuickImage::setVerticalAlignment(VAlignment align)-
419{-
420 QQuickImagePrivate * const d = d_func();-
421 if (d->vAlign == align
d->vAlign == alignDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
422 return;
never executed: return;
0
423-
424 d->vAlign = align;-
425 update();-
426 updatePaintedGeometry();-
427 verticalAlignmentChanged(align);-
428}
never executed: end of block
0
429-
430QQuickImage::HAlignment QQuickImage::horizontalAlignment() const-
431{-
432 const QQuickImagePrivate * const d = d_func();-
433 return
never executed: return d->hAlign;
d->hAlign;
never executed: return d->hAlign;
0
434}-
435-
436void QQuickImage::setHorizontalAlignment(HAlignment align)-
437{-
438 QQuickImagePrivate * const d = d_func();-
439 if (d->hAlign == align
d->hAlign == alignDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
440 return;
never executed: return;
0
441-
442 d->hAlign = align;-
443 update();-
444 updatePaintedGeometry();-
445 horizontalAlignmentChanged(align);-
446}
never executed: end of block
0
447bool QQuickImage::mipmap() const-
448{-
449 const QQuickImagePrivate * const d = d_func();-
450 return
never executed: return d->mipmap;
d->mipmap;
never executed: return d->mipmap;
0
451}-
452-
453void QQuickImage::setMipmap(bool use)-
454{-
455 QQuickImagePrivate * const d = d_func();-
456 if (d->mipmap == use
d->mipmap == useDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_scenegraph
)
0-4
457 return;
never executed: return;
0
458 d->mipmap = use;-
459 mipmapChanged(d->mipmap);-
460-
461 d->pixmapChanged = true;-
462 update();-
463}
executed 4 times by 1 test: end of block
Executed by:
  • tst_scenegraph
4
464-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0