OpenCoverage

qquickpixmapcache.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickpixmapcache.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQuick module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qquickpixmapcache_p.h"-
41#include <qquickimageprovider.h>-
42#include "qquickimageprovider_p.h"-
43-
44#include <qqmlengine.h>-
45#include <private/qqmlglobal_p.h>-
46#include <private/qqmlengine_p.h>-
47-
48#include <QtGui/private/qguiapplication_p.h>-
49#include <QtGui/private/qimage_p.h>-
50#include <qpa/qplatformintegration.h>-
51-
52#include <QtQuick/private/qsgtexture_p.h>-
53#include <QtQuick/private/qsgtexturereader_p.h>-
54-
55#include <QQuickWindow>-
56#include <QCoreApplication>-
57#include <QImageReader>-
58#include <QHash>-
59#include <QPixmapCache>-
60#include <QFile>-
61#include <QThread>-
62#include <QMutex>-
63#include <QMutexLocker>-
64#include <QWaitCondition>-
65#include <QBuffer>-
66#include <QWaitCondition>-
67#include <QtCore/qdebug.h>-
68#include <private/qobject_p.h>-
69#include <QQmlFile>-
70#include <QMetaMethod>-
71-
72#if QT_CONFIG(qml_network)-
73#include <qqmlnetworkaccessmanagerfactory.h>-
74#include <QNetworkReply>-
75#include <QSslError>-
76#endif-
77-
78#include <private/qquickprofiler_p.h>-
79-
80#define IMAGEREQUEST_MAX_NETWORK_REQUEST_COUNT 8-
81#define IMAGEREQUEST_MAX_REDIRECT_RECURSION 16-
82#define CACHE_EXPIRE_TIME 30-
83#define CACHE_REMOVAL_FRACTION 4-
84-
85#define PIXMAP_PROFILE(Code) Q_QUICK_PROFILE(QQuickProfiler::ProfilePixmapCache, Code)-
86-
87QT_BEGIN_NAMESPACE-
88-
89const QLatin1String QQuickPixmap::itemGrabberScheme = QLatin1String("itemgrabber");-
90-
91#ifndef QT_NO_DEBUG-
92static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK");-
93#endif-
94-
95// The cache limit describes the maximum "junk" in the cache.-
96static int cache_limit = 2048 * 1024; // 2048 KB cache limit for embedded in qpixmapcache.cpp-
97-
98static inline QString imageProviderId(const QUrl &url)-
99{-
100 return url.host();
executed 16258 times by 5 tests: return url.host();
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
16258
101}-
102-
103static inline QString imageId(const QUrl &url)-
104{-
105 return url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1);
executed 8116 times by 5 tests: return url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1);
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
8116
106}-
107-
108QQuickDefaultTextureFactory::QQuickDefaultTextureFactory(const QImage &image)-
109{-
110 if (image.format() == QImage::Format_ARGB32_Premultiplied
image.format()..._PremultipliedDescription
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquickanimatedimage
  • tst_qquickitem2
FALSEevaluated 8912 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
22-8912
111 || image.format() == QImage::Format_RGB32) {
image.format()...::Format_RGB32Description
TRUEevaluated 8306 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
FALSEevaluated 606 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
606-8306
112 im = image;-
113 } else {
executed 8328 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickpixmapcache
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
8328
114 im = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);-
115 }
executed 606 times by 34 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
606
116 size = im.size();-
117}
executed 8934 times by 38 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
8934
118-
119-
120QSGTexture *QQuickDefaultTextureFactory::createTexture(QQuickWindow *window) const-
121{-
122 QSGTexture *t = window->createTextureFromImage(im, QQuickWindow::TextureCanUseAtlas);-
123 static bool transient = qEnvironmentVariableIsSet("QSG_TRANSIENT_IMAGES");-
124 if (transient)
transientDescription
TRUEnever evaluated
FALSEevaluated 367 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
0-367
125 const_cast<QQuickDefaultTextureFactory *>(this)->im = QImage();
never executed: const_cast<QQuickDefaultTextureFactory *>(this)->im = QImage();
0
126 return t;
executed 367 times by 8 tests: return t;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
367
127}-
128-
129class QQuickPixmapReader;-
130class QQuickPixmapData;-
131class QQuickPixmapReply : public QObject-
132{-
133 Q_OBJECT-
134public:-
135 enum ReadError { NoError, Loading, Decoding };-
136-
137 QQuickPixmapReply(QQuickPixmapData *);-
138 ~QQuickPixmapReply();-
139-
140 QQuickPixmapData *data;-
141 QQmlEngine *engineForReader; // always access reader inside readerMutex-
142 QSize requestSize;-
143 QUrl url;-
144-
145 bool loading;-
146 QQuickImageProviderOptions providerOptions;-
147 int redirectCount;-
148-
149 class Event : public QEvent {-
150 public:-
151 Event(ReadError, const QString &, const QSize &, QQuickTextureFactory *factory);-
152 ~Event();-
153-
154 ReadError error;-
155 QString errorString;-
156 QSize implicitSize;-
157 QQuickTextureFactory *textureFactory;-
158 };-
159 void postReply(ReadError, const QString &, const QSize &, QQuickTextureFactory *factory);-
160-
161-
162Q_SIGNALS:-
163 void finished();-
164 void downloadProgress(qint64, qint64);-
165-
166protected:-
167 bool event(QEvent *event) override;-
168-
169private:-
170 Q_DISABLE_COPY(QQuickPixmapReply)-
171-
172public:-
173 static int finishedIndex;-
174 static int downloadProgressIndex;-
175};-
176-
177class QQuickPixmapReaderThreadObject : public QObject {-
178 Q_OBJECT-
179public:-
180 QQuickPixmapReaderThreadObject(QQuickPixmapReader *);-
181 void processJobs();-
182 bool event(QEvent *e) override;-
183public slots:-
184 void asyncResponseFinished(QQuickImageResponse *response);-
185private slots:-
186 void networkRequestDone();-
187 void asyncResponseFinished();-
188private:-
189 QQuickPixmapReader *reader;-
190};-
191-
192class QQuickPixmapData;-
193class QQuickPixmapReader : public QThread-
194{-
195 Q_OBJECT-
196public:-
197 QQuickPixmapReader(QQmlEngine *eng);-
198 ~QQuickPixmapReader();-
199-
200 QQuickPixmapReply *getImage(QQuickPixmapData *);-
201 void cancel(QQuickPixmapReply *rep);-
202-
203 static QQuickPixmapReader *instance(QQmlEngine *engine);-
204 static QQuickPixmapReader *existingInstance(QQmlEngine *engine);-
205-
206protected:-
207 void run() override;-
208-
209private:-
210 friend class QQuickPixmapReaderThreadObject;-
211 void processJobs();-
212 void processJob(QQuickPixmapReply *, const QUrl &, const QString &, QQuickImageProvider::ImageType, QQuickImageProvider *);-
213#if QT_CONFIG(qml_network)-
214 void networkRequestDone(QNetworkReply *);-
215#endif-
216 void asyncResponseFinished(QQuickImageResponse *);-
217-
218 QList<QQuickPixmapReply*> jobs;-
219 QList<QQuickPixmapReply*> cancelled;-
220 QQmlEngine *engine;-
221 QObject *eventLoopQuitHack;-
222-
223 QMutex mutex;-
224 QQuickPixmapReaderThreadObject *threadObject;-
225 QWaitCondition waitCondition;-
226-
227#if QT_CONFIG(qml_network)-
228 QNetworkAccessManager *networkAccessManager();-
229 QNetworkAccessManager *accessManager;-
230 QHash<QNetworkReply*,QQuickPixmapReply*> networkJobs;-
231#endif-
232 QHash<QQuickImageResponse*,QQuickPixmapReply*> asyncResponses;-
233-
234 static int replyDownloadProgress;-
235 static int replyFinished;-
236 static int downloadProgress;-
237 static int threadNetworkRequestDone;-
238 static QHash<QQmlEngine *,QQuickPixmapReader*> readers;-
239public:-
240 static QMutex readerMutex;-
241};-
242-
243class QQuickPixmapData-
244{-
245public:-
246 QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QSize &s, const QQuickImageProviderOptions &po, const QString &e)-
247 : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Error),-
248 url(u), errorString(e), requestSize(s),-
249 providerOptions(po), appliedTransform(QQuickImageProviderOptions::UsePluginDefaultTransform),-
250 textureFactory(nullptr), reply(nullptr), prevUnreferenced(nullptr),-
251 prevUnreferencedPtr(nullptr), nextUnreferenced(nullptr)-
252 {-
253 declarativePixmaps.insert(pixmap);-
254 }
executed 106 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
106
255-
256 QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, const QSize &r, const QQuickImageProviderOptions &po, QQuickImageProviderOptions::AutoTransform aTransform)-
257 : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Loading),-
258 url(u), requestSize(r),-
259 providerOptions(po), appliedTransform(aTransform),-
260 textureFactory(nullptr), reply(nullptr), prevUnreferenced(nullptr), prevUnreferencedPtr(nullptr),-
261 nextUnreferenced(nullptr)-
262 {-
263 declarativePixmaps.insert(pixmap);-
264 }
executed 2376 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2376
265-
266 QQuickPixmapData(QQuickPixmap *pixmap, const QUrl &u, QQuickTextureFactory *texture,-
267 const QSize &s, const QSize &r, const QQuickImageProviderOptions &po, QQuickImageProviderOptions::AutoTransform aTransform)-
268 : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Ready),-
269 url(u), implicitSize(s), requestSize(r),-
270 providerOptions(po), appliedTransform(aTransform),-
271 textureFactory(texture), reply(nullptr), prevUnreferenced(nullptr),-
272 prevUnreferencedPtr(nullptr), nextUnreferenced(nullptr)-
273 {-
274 declarativePixmaps.insert(pixmap);-
275 }
executed 8814 times by 37 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
8814
276-
277 QQuickPixmapData(QQuickPixmap *pixmap, QQuickTextureFactory *texture)-
278 : refCount(1), inCache(false), pixmapStatus(QQuickPixmap::Ready),-
279 appliedTransform(QQuickImageProviderOptions::UsePluginDefaultTransform),-
280 textureFactory(texture), reply(nullptr), prevUnreferenced(nullptr),-
281 prevUnreferencedPtr(nullptr), nextUnreferenced(nullptr)-
282 {-
283 if (texture)
textureDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickanimatedimage
FALSEnever evaluated
0-12
284 requestSize = implicitSize = texture->textureSize();
executed 12 times by 1 test: requestSize = implicitSize = texture->textureSize();
Executed by:
  • tst_qquickanimatedimage
12
285 declarativePixmaps.insert(pixmap);-
286 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickanimatedimage
12
287-
288 ~QQuickPixmapData()-
289 {-
290 while (!declarativePixmaps.isEmpty()) {
!declarativePixmaps.isEmpty()Description
TRUEevaluated 1278 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
FALSEevaluated 11308 times by 40 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
1278-11308
291 QQuickPixmap *referencer = declarativePixmaps.first();-
292 declarativePixmaps.remove(referencer);-
293 referencer->d = nullptr;-
294 }
executed 1278 times by 3 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
1278
295 delete textureFactory;-
296 }
executed 11308 times by 40 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
11308
297-
298 int cost() const;-
299 void addref();-
300 void release();-
301 void addToCache();-
302 void removeFromCache();-
303-
304 uint refCount;-
305-
306 bool inCache:1;-
307-
308 QQuickPixmap::Status pixmapStatus;-
309 QUrl url;-
310 QString errorString;-
311 QSize implicitSize;-
312 QSize requestSize;-
313 QQuickImageProviderOptions providerOptions;-
314 QQuickImageProviderOptions::AutoTransform appliedTransform;-
315-
316 QQuickTextureFactory *textureFactory;-
317-
318 QIntrusiveList<QQuickPixmap, &QQuickPixmap::dataListNode> declarativePixmaps;-
319 QQuickPixmapReply *reply;-
320-
321 QQuickPixmapData *prevUnreferenced;-
322 QQuickPixmapData**prevUnreferencedPtr;-
323 QQuickPixmapData *nextUnreferenced;-
324};-
325-
326int QQuickPixmapReply::finishedIndex = -1;-
327int QQuickPixmapReply::downloadProgressIndex = -1;-
328-
329// XXX-
330QHash<QQmlEngine *,QQuickPixmapReader*> QQuickPixmapReader::readers;-
331QMutex QQuickPixmapReader::readerMutex;-
332-
333int QQuickPixmapReader::replyDownloadProgress = -1;-
334int QQuickPixmapReader::replyFinished = -1;-
335int QQuickPixmapReader::downloadProgress = -1;-
336int QQuickPixmapReader::threadNetworkRequestDone = -1;-
337-
338-
339void QQuickPixmapReply::postReply(ReadError error, const QString &errorString,-
340 const QSize &implicitSize, QQuickTextureFactory *factory)-
341{-
342 loading = false;-
343 QCoreApplication::postEvent(this, new Event(error, errorString, implicitSize, factory));-
344}
executed 142 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
142
345-
346QQuickPixmapReply::Event::Event(ReadError e, const QString &s, const QSize &iSize, QQuickTextureFactory *factory)-
347 : QEvent(QEvent::User), error(e), errorString(s), implicitSize(iSize), textureFactory(factory)-
348{-
349}
executed 142 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
142
350-
351QQuickPixmapReply::Event::~Event()-
352{-
353 delete textureFactory;-
354}
executed 142 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
142
355-
356#if QT_CONFIG(qml_network)-
357QNetworkAccessManager *QQuickPixmapReader::networkAccessManager()-
358{-
359 if (!accessManager) {
!accessManagerDescription
TRUEevaluated 32 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 299 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
32-299
360 Q_ASSERT(threadObject);-
361 accessManager = QQmlEnginePrivate::get(engine)->createNetworkAccessManager(threadObject);-
362 }
executed 32 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
32
363 return accessManager;
executed 331 times by 8 tests: return accessManager;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
331
364}-
365#endif-
366-
367static void maybeRemoveAlpha(QImage *image)-
368{-
369 // If the image-
370 if (image->hasAlphaChannel() && image->data_ptr()
image->hasAlphaChannel()Description
TRUEevaluated 570 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEevaluated 184 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
image->data_ptr()Description
TRUEevaluated 570 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
0-570
371 && !image->data_ptr()->checkForAlphaPixels()) {
!image->data_p...rAlphaPixels()Description
TRUEevaluated 34 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
FALSEevaluated 536 times by 33 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
34-536
372 switch (image->format()) {-
373 case QImage::Format_RGBA8888:
never executed: case QImage::Format_RGBA8888:
0
374 case QImage::Format_RGBA8888_Premultiplied:
never executed: case QImage::Format_RGBA8888_Premultiplied:
0
375 *image = image->convertToFormat(QImage::Format_RGBX8888);-
376 break;
never executed: break;
0
377 case QImage::Format_A2BGR30_Premultiplied:
never executed: case QImage::Format_A2BGR30_Premultiplied:
0
378 *image = image->convertToFormat(QImage::Format_BGR30);-
379 break;
never executed: break;
0
380 case QImage::Format_A2RGB30_Premultiplied:
never executed: case QImage::Format_A2RGB30_Premultiplied:
0
381 *image = image->convertToFormat(QImage::Format_RGB30);-
382 break;
never executed: break;
0
383 default:
executed 34 times by 3 tests: default:
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
34
384 *image = image->convertToFormat(QImage::Format_RGB32);-
385 break;
executed 34 times by 3 tests: break;
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_scenegraph
34
386 }-
387 }-
388}
executed 754 times by 35 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
754
389-
390static bool readImage(const QUrl& url, QIODevice *dev, QImage *image, QString *errorString, QSize *impsize,-
391 const QSize &requestSize, const QQuickImageProviderOptions &providerOptions,-
392 QQuickImageProviderOptions::AutoTransform *appliedTransform = nullptr)-
393{-
394 QImageReader imgio(dev);-
395 if (providerOptions.autoTransform() != QQuickImageProviderOptions::UsePluginDefaultTransform)
providerOption...faultTransformDescription
TRUEnever evaluated
FALSEevaluated 754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
0-754
396 imgio.setAutoTransform(providerOptions.autoTransform() == QQuickImageProviderOptions::ApplyTransform);
never executed: imgio.setAutoTransform(providerOptions.autoTransform() == QQuickImageProviderOptions::ApplyTransform);
0
397 else if (appliedTransform)
appliedTransformDescription
TRUEevaluated 698 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEevaluated 56 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
56-698
398 *appliedTransform = imgio.autoTransform() ? QQuickImageProviderOptions::ApplyTransform : QQuickImageProviderOptions::DoNotApplyTransform;
executed 698 times by 34 tests: *appliedTransform = imgio.autoTransform() ? QQuickImageProviderOptions::ApplyTransform : QQuickImageProviderOptions::DoNotApplyTransform;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
imgio.autoTransform()Description
TRUEnever evaluated
FALSEevaluated 698 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
0-698
399-
400 QSize scSize = QQuickImageProviderWithOptions::loadSize(imgio.size(), requestSize, imgio.format(), providerOptions);-
401 if (scSize.isValid())
scSize.isValid()Description
TRUEevaluated 36 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_sharedimage
FALSEevaluated 718 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
36-718
402 imgio.setScaledSize(scSize);
executed 36 times by 5 tests: imgio.setScaledSize(scSize);
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_sharedimage
36
403-
404 if (impsize)
impsizeDescription
TRUEevaluated 754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
0-754
405 *impsize = imgio.size();
executed 754 times by 35 tests: *impsize = imgio.size();
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
754
406-
407 if (imgio.read(image)) {
imgio.read(image)Description
TRUEevaluated 754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
0-754
408 maybeRemoveAlpha(image);-
409 if (impsize && impsize->width() < 0)
impsizeDescription
TRUEevaluated 754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
impsize->width() < 0Description
TRUEnever evaluated
FALSEevaluated 754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
0-754
410 *impsize = image->size();
never executed: *impsize = image->size();
0
411 return true;
executed 754 times by 35 tests: return true;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
754
412 } else {-
413 if (errorString)
errorStringDescription
TRUEnever evaluated
FALSEnever evaluated
0
414 *errorString = QQuickPixmap::tr("Error decoding: %1: %2").arg(url.toString())
never executed: *errorString = QQuickPixmap::tr("Error decoding: %1: %2").arg(url.toString()) .arg(imgio.errorString());
0
415 .arg(imgio.errorString());
never executed: *errorString = QQuickPixmap::tr("Error decoding: %1: %2").arg(url.toString()) .arg(imgio.errorString());
0
416 return false;
never executed: return false;
0
417 }-
418}-
419-
420static QStringList fromLatin1List(const QList<QByteArray> &list)-
421{-
422 QStringList res;-
423 res.reserve(list.size());-
424 for (const QByteArray &item : list)-
425 res.append(QString::fromLatin1(item));
executed 952 times by 34 tests: res.append(QString::fromLatin1(item));
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
952
426 return res;
executed 68 times by 34 tests: return res;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
68
427}-
428-
429class BackendSupport-
430{-
431public:-
432 BackendSupport()-
433 {-
434 delete QSGContext::createTextureFactoryFromImage(QImage()); // Force init of backend data-
435 hasOpenGL = QQuickWindow::sceneGraphBackend().isEmpty(); // i.e. default-
436 QList<QByteArray> list;-
437 if (hasOpenGL)
hasOpenGLDescription
TRUEevaluated 68 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
0-68
438 list.append(QSGTextureReader::supportedFileFormats());
executed 68 times by 34 tests: list.append(QSGTextureReader::supportedFileFormats());
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
68
439 list.append(QImageReader::supportedImageFormats());-
440 fileSuffixes = fromLatin1List(list);-
441 }
executed 68 times by 34 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
68
442 bool hasOpenGL;-
443 QStringList fileSuffixes;-
444};-
445Q_GLOBAL_STATIC(BackendSupport, backendSupport);
executed 68 times by 34 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
executed 68 times by 34 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
executed 730 times by 34 tests: return &holder.value;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 68 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
0-730
446-
447static QString existingImageFileForPath(const QString &localFile)-
448{-
449 // Do nothing if given filepath exists or already has a suffix-
450 QFileInfo fi(localFile);-
451 if (!fi.suffix().isEmpty() || fi.exists())
!fi.suffix().isEmpty()Description
TRUEevaluated 800 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickimage
fi.exists()Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickimage
0-800
452 return localFile;
executed 800 times by 35 tests: return localFile;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
800
453-
454 QString tryFile = localFile + QStringLiteral(".xxxx");-
455 const int suffixIdx = localFile.length() + 1;-
456 for (const QString &suffix : backendSupport()->fileSuffixes) {-
457 tryFile.replace(suffixIdx, 10, suffix);-
458 if (QFileInfo::exists(tryFile))
QFileInfo::exists(tryFile)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_qquickimage
10-88
459 return tryFile;
executed 10 times by 1 test: return tryFile;
Executed by:
  • tst_qquickimage
10
460 }
executed 88 times by 1 test: end of block
Executed by:
  • tst_qquickimage
88
461 return localFile;
executed 2 times by 1 test: return localFile;
Executed by:
  • tst_qquickimage
2
462}-
463-
464QQuickPixmapReader::QQuickPixmapReader(QQmlEngine *eng)-
465: QThread(eng), engine(eng), threadObject(nullptr)-
466#if QT_CONFIG(qml_network)-
467, accessManager(nullptr)-
468#endif-
469{-
470 eventLoopQuitHack = new QObject;-
471 eventLoopQuitHack->moveToThread(this);-
472 connect(eventLoopQuitHack, SIGNAL(destroyed(QObject*)), SLOT(quit()), Qt::DirectConnection);-
473 start(QThread::LowestPriority);-
474}
executed 80 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
80
475-
476QQuickPixmapReader::~QQuickPixmapReader()-
477{-
478 readerMutex.lock();-
479 readers.remove(engine);-
480 readerMutex.unlock();-
481-
482 mutex.lock();-
483 // manually cancel all outstanding jobs.-
484 for (QQuickPixmapReply *reply : qAsConst(jobs)) {-
485 if (reply->data && reply->data->reply == reply)
reply->dataDescription
TRUEnever evaluated
FALSEnever evaluated
reply->data->reply == replyDescription
TRUEnever evaluated
FALSEnever evaluated
0
486 reply->data->reply = nullptr;
never executed: reply->data->reply = nullptr;
0
487 delete reply;-
488 }
never executed: end of block
0
489 jobs.clear();-
490#if QT_CONFIG(qml_network)-
491-
492 const auto cancelJob = [this](QQuickPixmapReply *reply) {-
493 if (reply->loading) {
reply->loadingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpixmapcache
FALSEnever evaluated
0-2
494 cancelled.append(reply);-
495 reply->data = nullptr;-
496 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpixmapcache
2
497 };
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpixmapcache
2
498-
499 for (auto *reply : qAsConst(networkJobs))-
500 cancelJob(reply);
executed 2 times by 1 test: cancelJob(reply);
Executed by:
  • tst_qquickpixmapcache
2
501-
502 for (auto *reply : qAsConst(asyncResponses))-
503 cancelJob(reply);
never executed: cancelJob(reply);
0
504#endif-
505 if (threadObject) threadObject->processJobs();
executed 80 times by 10 tests: threadObject->processJobs();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
threadObjectDescription
TRUEevaluated 80 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEnever evaluated
0-80
506 mutex.unlock();-
507-
508 eventLoopQuitHack->deleteLater();-
509 wait();-
510}
executed 80 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
80
511-
512#if QT_CONFIG(qml_network)-
513void QQuickPixmapReader::networkRequestDone(QNetworkReply *reply)-
514{-
515 QQuickPixmapReply *job = networkJobs.take(reply);-
516-
517 if (job) {
jobDescription
TRUEevaluated 62 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 265 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
62-265
518 job->redirectCount++;-
519 if (job->redirectCount < IMAGEREQUEST_MAX_REDIRECT_RECURSION) {
job->redirectCount < 16Description
TRUEevaluated 62 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
0-62
520 QVariant redirect = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);-
521 if (redirect.isValid()) {
redirect.isValid()Description
TRUEnever evaluated
FALSEevaluated 62 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
0-62
522 QUrl url = reply->url().resolved(redirect.toUrl());-
523 QNetworkRequest req(url);-
524 req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);-
525-
526 reply->deleteLater();-
527 reply = networkAccessManager()->get(req);-
528-
529 QMetaObject::connect(reply, replyDownloadProgress, job, downloadProgress);-
530 QMetaObject::connect(reply, replyFinished, threadObject, threadNetworkRequestDone);-
531-
532 networkJobs.insert(reply, job);-
533 return;
never executed: return;
0
534 }-
535 }
executed 62 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
62
536-
537 QImage image;-
538 QQuickPixmapReply::ReadError error = QQuickPixmapReply::NoError;-
539 QString errorString;-
540 QSize readSize;-
541 if (reply->error()) {
reply->error()Description
TRUEevaluated 16 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickpixmapcache
  • tst_qquicktextedit
FALSEevaluated 46 times by 5 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
16-46
542 error = QQuickPixmapReply::Loading;-
543 errorString = reply->errorString();-
544 } else {
executed 16 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickpixmapcache
  • tst_qquicktextedit
16
545 QByteArray all = reply->readAll();-
546 QBuffer buff(&all);-
547 buff.open(QIODevice::ReadOnly);-
548 if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->requestSize, job->providerOptions))
!readImage(rep...oviderOptions)Description
TRUEnever evaluated
FALSEevaluated 46 times by 5 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
0-46
549 error = QQuickPixmapReply::Decoding;
never executed: error = QQuickPixmapReply::Decoding;
0
550 }
executed 46 times by 5 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
46
551 // send completion event to the QQuickPixmapReply-
552 mutex.lock();-
553 if (!cancelled.contains(job))
!cancelled.contains(job)Description
TRUEevaluated 62 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
0-62
554 job->postReply(error, errorString, readSize, QQuickTextureFactory::textureFactoryForImage(image));
executed 62 times by 6 tests: job->postReply(error, errorString, readSize, QQuickTextureFactory::textureFactoryForImage(image));
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
62
555 mutex.unlock();-
556 }
executed 62 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
62
557 reply->deleteLater();-
558-
559 // kick off event loop again incase we have dropped below max request count-
560 threadObject->processJobs();-
561}
executed 327 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
327
562#endif // qml_network-
563-
564void QQuickPixmapReader::asyncResponseFinished(QQuickImageResponse *response)-
565{-
566 QQuickPixmapReply *job = asyncResponses.take(response);-
567-
568 if (job) {
jobDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEnever evaluated
0-16
569 QQuickTextureFactory *t = nullptr;-
570 QQuickPixmapReply::ReadError error = QQuickPixmapReply::NoError;-
571 QString errorString;-
572 if (!response->errorString().isEmpty()) {
!response->err...ng().isEmpty()Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
0-16
573 error = QQuickPixmapReply::Loading;-
574 errorString = response->errorString();-
575 } else {
never executed: end of block
0
576 t = response->textureFactory();-
577 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
16
578 mutex.lock();-
579 if (!cancelled.contains(job))
!cancelled.contains(job)Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEnever evaluated
0-16
580 job->postReply(error, errorString, t ? t->textureSize() : QSize(), t);
executed 16 times by 1 test: job->postReply(error, errorString, t ? t->textureSize() : QSize(), t);
Executed by:
  • tst_qquickimageprovider
16
581 else-
582 delete t;
never executed: delete t;
0
583 mutex.unlock();-
584 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
16
585 response->deleteLater();-
586-
587 // kick off event loop again incase we have dropped below max request count-
588 threadObject->processJobs();-
589}
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
16
590-
591QQuickPixmapReaderThreadObject::QQuickPixmapReaderThreadObject(QQuickPixmapReader *i)-
592: reader(i)-
593{-
594}
executed 80 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
80
595-
596void QQuickPixmapReaderThreadObject::processJobs()-
597{-
598 QCoreApplication::postEvent(this, new QEvent(QEvent::User));-
599}
executed 2968 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2968
600-
601bool QQuickPixmapReaderThreadObject::event(QEvent *e)-
602{-
603 if (e->type() == QEvent::User) {
e->type() == QEvent::UserDescription
TRUEevaluated 2966 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 48 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
48-2966
604 reader->processJobs();-
605 return true;
executed 2966 times by 10 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2966
606 } else {-
607 return QObject::event(e);
executed 48 times by 9 tests: return QObject::event(e);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
48
608 }-
609}-
610-
611void QQuickPixmapReaderThreadObject::networkRequestDone()-
612{-
613#if QT_CONFIG(qml_network)-
614 QNetworkReply *reply = static_cast<QNetworkReply *>(sender());-
615 reader->networkRequestDone(reply);-
616#endif-
617}
executed 327 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
327
618-
619void QQuickPixmapReaderThreadObject::asyncResponseFinished(QQuickImageResponse *response)-
620{-
621 reader->asyncResponseFinished(response);-
622}
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
16
623-
624void QQuickPixmapReaderThreadObject::asyncResponseFinished()-
625{-
626 QQuickImageResponse *response = static_cast<QQuickImageResponse *>(sender());-
627 asyncResponseFinished(response);-
628}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
8
629-
630void QQuickPixmapReader::processJobs()-
631{-
632 QMutexLocker locker(&mutex);-
633-
634 while (true) {-
635 if (cancelled.isEmpty() && jobs.isEmpty())
cancelled.isEmpty()Description
TRUEevaluated 3244 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 259 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
jobs.isEmpty()Description
TRUEevaluated 3046 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 198 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
198-3244
636 return; // Nothing else to do
executed 3046 times by 10 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
3046
637-
638 // Clean cancelled jobs-
639 if (!cancelled.isEmpty()) {
!cancelled.isEmpty()Description
TRUEevaluated 259 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
FALSEevaluated 198 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
198-259
640#if QT_CONFIG(qml_network)-
641 for (int i = 0; i < cancelled.count(); ++i) {
i < cancelled.count()Description
TRUEevaluated 269 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
FALSEevaluated 259 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
259-269
642 QQuickPixmapReply *job = cancelled.at(i);-
643 QNetworkReply *reply = networkJobs.key(job, 0);-
644 if (reply) {
replyDescription
TRUEevaluated 269 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
FALSEnever evaluated
0-269
645 networkJobs.remove(reply);-
646 if (reply->isRunning()) {
reply->isRunning()Description
TRUEevaluated 269 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
FALSEnever evaluated
0-269
647 // cancel any jobs already started-
648 reply->close();-
649 }
executed 269 times by 5 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
269
650 } else {
executed 269 times by 5 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
269
651 QQuickImageResponse *asyncResponse = asyncResponses.key(job);-
652 if (asyncResponse) {
asyncResponseDescription
TRUEnever evaluated
FALSEnever evaluated
0
653 asyncResponses.remove(asyncResponse);-
654 asyncResponse->cancel();-
655 }
never executed: end of block
0
656 }
never executed: end of block
0
657 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(job->url));
never executed: end of block
executed 269 times by 5 tests: (void)0;
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 269 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
0-269
658 // deleteLater, since not owned by this thread-
659 job->deleteLater();-
660 }
executed 269 times by 5 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
269
661 cancelled.clear();-
662#endif-
663 }
executed 259 times by 5 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
259
664-
665 if (!jobs.isEmpty()) {
!jobs.isEmpty()Description
TRUEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 46 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
46-411
666 // Find a job we can use-
667 bool usableJob = false;-
668 for (int i = jobs.count() - 1; !usableJob && i >= 0; i--) {
!usableJobDescription
TRUEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
i >= 0Description
TRUEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEnever evaluated
0-411
669 QQuickPixmapReply *job = jobs.at(i);-
670 const QUrl url = job->url;-
671 QString localFile;-
672 QQuickImageProvider::ImageType imageType = QQuickImageProvider::Invalid;-
673 QQuickImageProvider *provider = nullptr;-
674-
675 if (url.scheme() == QLatin1String("image")) {
url.scheme() =...tring("image")Description
TRUEevaluated 64 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
FALSEevaluated 347 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
64-347
676 provider = static_cast<QQuickImageProvider *>(engine->imageProvider(imageProviderId(url)));-
677 if (provider)
providerDescription
TRUEevaluated 62 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
2-62
678 imageType = provider->imageType();
executed 62 times by 3 tests: imageType = provider->imageType();
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
62
679-
680 usableJob = true;-
681 } else {
executed 64 times by 3 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
64
682 localFile = QQmlFile::urlToLocalFileOrQrc(url);-
683 usableJob = !localFile.isEmpty()
!localFile.isEmpty()Description
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 331 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
16-331
684#if QT_CONFIG(qml_network)-
685 || networkJobs.count() < IMAGEREQUEST_MAX_NETWORK_REQUEST_COUNT
networkJobs.count() < 8Description
TRUEevaluated 331 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
0-331
686#endif-
687 ;-
688 }
executed 347 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
347
689-
690-
691 if (usableJob) {
usableJobDescription
TRUEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEnever evaluated
0-411
692 jobs.removeAt(i);-
693-
694 job->loading = true;-
695-
696 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingStarted>(url));
never executed: end of block
executed 411 times by 10 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
0-411
697-
698 locker.unlock();-
699 processJob(job, url, localFile, imageType, provider);-
700 locker.relock();-
701 }
executed 411 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
411
702 }
executed 411 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
411
703-
704 if (!usableJob)
!usableJobDescription
TRUEnever evaluated
FALSEevaluated 411 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
0-411
705 return;
never executed: return;
0
706 }
executed 411 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
411
707 }
executed 457 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
457
708}
never executed: end of block
0
709-
710void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &url, const QString &localFile,-
711 QQuickImageProvider::ImageType imageType, QQuickImageProvider *provider)-
712{-
713 // fetch-
714 if (url.scheme() == QLatin1String("image")) {
url.scheme() =...tring("image")Description
TRUEevaluated 64 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
FALSEevaluated 347 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
64-347
715 // Use QQuickImageProvider-
716 QSize readSize;-
717-
718 if (imageType == QQuickImageProvider::Invalid) {
imageType == Q...vider::InvalidDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEevaluated 62 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
2-62
719 QString errorStr = QQuickPixmap::tr("Invalid image provider: %1").arg(url.toString());-
720 mutex.lock();-
721 if (!cancelled.contains(runningJob))
!cancelled.con...ns(runningJob)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEnever evaluated
0-2
722 runningJob->postReply(QQuickPixmapReply::Loading, errorStr, readSize, nullptr);
executed 2 times by 1 test: runningJob->postReply(QQuickPixmapReply::Loading, errorStr, readSize, nullptr);
Executed by:
  • tst_qquickimageprovider
2
723 mutex.unlock();-
724 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickimageprovider
2
725 }-
726-
727 QQuickImageProviderWithOptions *providerV2 = QQuickImageProviderWithOptions::checkedCast(provider);-
728-
729 switch (imageType) {-
730 case QQuickImageProvider::Invalid:
never executed: case QQuickImageProvider::Invalid:
0
731 {-
732 // Already handled-
733 break;
never executed: break;
0
734 }-
735-
736 case QQuickImageProvider::Image:
executed 46 times by 3 tests: case QQuickImageProvider::Image:
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
46
737 {-
738 QImage image;-
739 if (providerV2) {
providerV2Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_sharedimage
FALSEevaluated 44 times by 2 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
2-44
740 image = providerV2->requestImage(imageId(url), &readSize, runningJob->requestSize, runningJob->providerOptions);-
741 } else {
executed 2 times by 1 test: end of block
Executed by:
  • tst_sharedimage
2
742 image = provider->requestImage(imageId(url), &readSize, runningJob->requestSize);-
743 }
executed 44 times by 2 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
44
744 QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError;-
745 QString errorStr;-
746 if (image.isNull()) {
image.isNull()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEevaluated 42 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
4-42
747 errorCode = QQuickPixmapReply::Loading;-
748 errorStr = QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString());-
749 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
4
750 mutex.lock();-
751 if (!cancelled.contains(runningJob))
!cancelled.con...ns(runningJob)Description
TRUEevaluated 46 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
FALSEnever evaluated
0-46
752 runningJob->postReply(errorCode, errorStr, readSize, QQuickTextureFactory::textureFactoryForImage(image));
executed 46 times by 3 tests: runningJob->postReply(errorCode, errorStr, readSize, QQuickTextureFactory::textureFactoryForImage(image));
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
46
753 mutex.unlock();-
754 break;
executed 46 times by 3 tests: break;
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
46
755 }-
756-
757 case QQuickImageProvider::Pixmap:
never executed: case QQuickImageProvider::Pixmap:
0
758 {-
759 QPixmap pixmap;-
760 if (providerV2) {
providerV2Description
TRUEnever evaluated
FALSEnever evaluated
0
761 pixmap = providerV2->requestPixmap(imageId(url), &readSize, runningJob->requestSize, runningJob->providerOptions);-
762 } else {
never executed: end of block
0
763 pixmap = provider->requestPixmap(imageId(url), &readSize, runningJob->requestSize);-
764 }
never executed: end of block
0
765 QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError;-
766 QString errorStr;-
767 if (pixmap.isNull()) {
pixmap.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
0
768 errorCode = QQuickPixmapReply::Loading;-
769 errorStr = QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString());-
770 }
never executed: end of block
0
771 mutex.lock();-
772 if (!cancelled.contains(runningJob))
!cancelled.con...ns(runningJob)Description
TRUEnever evaluated
FALSEnever evaluated
0
773 runningJob->postReply(errorCode, errorStr, readSize, QQuickTextureFactory::textureFactoryForImage(pixmap.toImage()));
never executed: runningJob->postReply(errorCode, errorStr, readSize, QQuickTextureFactory::textureFactoryForImage(pixmap.toImage()));
0
774 mutex.unlock();-
775 break;
never executed: break;
0
776 }-
777-
778 case QQuickImageProvider::Texture:
never executed: case QQuickImageProvider::Texture:
0
779 {-
780 QQuickTextureFactory *t;-
781 if (providerV2) {
providerV2Description
TRUEnever evaluated
FALSEnever evaluated
0
782 t = providerV2->requestTexture(imageId(url), &readSize, runningJob->requestSize, runningJob->providerOptions);-
783 } else {
never executed: end of block
0
784 t = provider->requestTexture(imageId(url), &readSize, runningJob->requestSize);-
785 }
never executed: end of block
0
786 QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError;-
787 QString errorStr;-
788 if (!t) {
!tDescription
TRUEnever evaluated
FALSEnever evaluated
0
789 errorCode = QQuickPixmapReply::Loading;-
790 errorStr = QQuickPixmap::tr("Failed to get texture from provider: %1").arg(url.toString());-
791 }
never executed: end of block
0
792 mutex.lock();-
793 if (!cancelled.contains(runningJob))
!cancelled.con...ns(runningJob)Description
TRUEnever evaluated
FALSEnever evaluated
0
794 runningJob->postReply(errorCode, errorStr, readSize, t);
never executed: runningJob->postReply(errorCode, errorStr, readSize, t);
0
795 else-
796 delete t;
never executed: delete t;
0
797 mutex.unlock();-
798 break;
never executed: break;
0
799 }-
800-
801 case QQuickImageProvider::ImageResponse:
executed 16 times by 1 test: case QQuickImageProvider::ImageResponse:
Executed by:
  • tst_qquickimageprovider
16
802 {-
803 QQuickImageResponse *response;-
804 if (providerV2) {
providerV2Description
TRUEnever evaluated
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
0-16
805 response = providerV2->requestImageResponse(imageId(url), runningJob->requestSize, runningJob->providerOptions);-
806 } else {
never executed: end of block
0
807 QQuickAsyncImageProvider *asyncProvider = static_cast<QQuickAsyncImageProvider*>(provider);-
808 response = asyncProvider->requestImageResponse(imageId(url), runningJob->requestSize);-
809 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
16
810-
811 // Might be that the async provider was so quick it emitted the signal before we-
812 // could connect to it.-
813 if (static_cast<QQuickImageResponsePrivate*>(QObjectPrivate::get(response))->finished) {
static_cast<QQ...se))->finishedDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
8
814 QMetaObject::invokeMethod(threadObject, "asyncResponseFinished",-
815 Qt::QueuedConnection, Q_ARG(QQuickImageResponse*, response));-
816 } else {
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
8
817 QObject::connect(response, SIGNAL(finished()), threadObject, SLOT(asyncResponseFinished()));-
818 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
8
819-
820 asyncResponses.insert(response, runningJob);-
821 break;
executed 16 times by 1 test: break;
Executed by:
  • tst_qquickimageprovider
16
822 }-
823 }-
824-
825 } else {
executed 62 times by 3 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
62
826 if (!localFile.isEmpty()) {
!localFile.isEmpty()Description
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 331 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
16-331
827 // Image is local - load/decode immediately-
828 QImage image;-
829 QQuickPixmapReply::ReadError errorCode = QQuickPixmapReply::NoError;-
830 QString errorStr;-
831 QFile f(existingImageFileForPath(localFile));-
832 QSize readSize;-
833 if (f.open(QIODevice::ReadOnly)) {
f.open(QIODevice::ReadOnly)Description
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimage
2-14
834 QSGTextureReader texReader(&f, localFile);-
835 if (backendSupport()->hasOpenGL && texReader.isTexture()) {
backendSupport()->hasOpenGLDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
FALSEnever evaluated
texReader.isTexture()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 10 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
0-14
836 QQuickTextureFactory *factory = texReader.read();-
837 if (factory) {
factoryDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEnever evaluated
0-4
838 readSize = factory->textureSize();-
839 } else {
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickimage
4
840 errorStr = QQuickPixmap::tr("Error decoding: %1").arg(url.toString());-
841 if (f.fileName() != localFile)
f.fileName() != localFileDescription
TRUEnever evaluated
FALSEnever evaluated
0
842 errorStr += QString::fromLatin1(" (%1)").arg(f.fileName());
never executed: errorStr += QString::fromLatin1(" (%1)").arg(f.fileName());
0
843 errorCode = QQuickPixmapReply::Decoding;-
844 }
never executed: end of block
0
845 mutex.lock();-
846 if (!cancelled.contains(runningJob))
!cancelled.con...ns(runningJob)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEnever evaluated
0-4
847 runningJob->postReply(errorCode, errorStr, readSize, factory);
executed 4 times by 1 test: runningJob->postReply(errorCode, errorStr, readSize, factory);
Executed by:
  • tst_qquickimage
4
848 mutex.unlock();-
849 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickimage
4
850 } else {-
851 if (!readImage(url, &f, &image, &errorStr, &readSize, runningJob->requestSize, runningJob->providerOptions)) {
!readImage(url...oviderOptions)Description
TRUEnever evaluated
FALSEevaluated 10 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
0-10
852 errorCode = QQuickPixmapReply::Loading;-
853 if (f.fileName() != localFile)
f.fileName() != localFileDescription
TRUEnever evaluated
FALSEnever evaluated
0
854 errorStr += QString::fromLatin1(" (%1)").arg(f.fileName());
never executed: errorStr += QString::fromLatin1(" (%1)").arg(f.fileName());
0
855 }
never executed: end of block
0
856 }
executed 10 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
10
857 } else {-
858 errorStr = QQuickPixmap::tr("Cannot open: %1").arg(url.toString());-
859 errorCode = QQuickPixmapReply::Loading;-
860 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickimage
2
861 mutex.lock();-
862 if (!cancelled.contains(runningJob))
!cancelled.con...ns(runningJob)Description
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
FALSEnever evaluated
0-12
863 runningJob->postReply(errorCode, errorStr, readSize, QQuickTextureFactory::textureFactoryForImage(image));
executed 12 times by 3 tests: runningJob->postReply(errorCode, errorStr, readSize, QQuickTextureFactory::textureFactoryForImage(image));
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
12
864 mutex.unlock();-
865 } else {
executed 12 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_sharedimage
12
866#if QT_CONFIG(qml_network)-
867 // Network resource-
868 QNetworkRequest req(url);-
869 req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);-
870 QNetworkReply *reply = networkAccessManager()->get(req);-
871-
872 QMetaObject::connect(reply, replyDownloadProgress, runningJob, downloadProgress);-
873 QMetaObject::connect(reply, replyFinished, threadObject, threadNetworkRequestDone);-
874-
875 networkJobs.insert(reply, runningJob);-
876#else-
877// Silently fail if compiled with no_network-
878#endif-
879 }
executed 331 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
331
880 }-
881}-
882-
883QQuickPixmapReader *QQuickPixmapReader::instance(QQmlEngine *engine)-
884{-
885 // XXX NOTE: must be called within readerMutex locking.-
886 QQuickPixmapReader *reader = readers.value(engine);-
887 if (!reader) {
!readerDescription
TRUEevaluated 80 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 2296 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
80-2296
888 reader = new QQuickPixmapReader(engine);-
889 readers.insert(engine, reader);-
890 }
executed 80 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
80
891-
892 return reader;
executed 2376 times by 10 tests: return reader;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2376
893}-
894-
895QQuickPixmapReader *QQuickPixmapReader::existingInstance(QQmlEngine *engine)-
896{-
897 // XXX NOTE: must be called within readerMutex locking.-
898 return readers.value(engine, 0);
executed 2244 times by 7 tests: return readers.value(engine, 0);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
2244
899}-
900-
901QQuickPixmapReply *QQuickPixmapReader::getImage(QQuickPixmapData *data)-
902{-
903 mutex.lock();-
904 QQuickPixmapReply *reply = new QQuickPixmapReply(data);-
905 reply->engineForReader = engine;-
906 jobs.append(reply);-
907 // XXX-
908 if (threadObject) threadObject->processJobs();
executed 2278 times by 6 tests: threadObject->processJobs();
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
threadObjectDescription
TRUEevaluated 2278 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 98 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
98-2278
909 mutex.unlock();-
910 return reply;
executed 2376 times by 10 tests: return reply;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2376
911}-
912-
913void QQuickPixmapReader::cancel(QQuickPixmapReply *reply)-
914{-
915 mutex.lock();-
916 if (reply->loading) {
reply->loadingDescription
TRUEevaluated 267 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
FALSEevaluated 1975 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
267-1975
917 cancelled.append(reply);-
918 reply->data = nullptr;-
919 // XXX-
920 if (threadObject) threadObject->processJobs();
executed 267 times by 5 tests: threadObject->processJobs();
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
threadObjectDescription
TRUEevaluated 267 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
FALSEnever evaluated
0-267
921 } else {
executed 267 times by 5 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
267
922 // If loading was started (reply removed from jobs) but the reply was never processed-
923 // (otherwise it would have deleted itself) we need to profile an error.-
924 if (jobs.removeAll(reply) == 0) {
jobs.removeAll(reply) == 0Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 1965 times by 4 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
10-1965
925 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(reply->url));
never executed: end of block
executed 10 times by 1 test: (void)0;
Executed by:
  • tst_examples
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_examples
0-10
926 }-
927 delete reply;-
928 }
executed 1975 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
1975
929 mutex.unlock();-
930}
executed 2242 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
2242
931-
932void QQuickPixmapReader::run()-
933{-
934 if (replyDownloadProgress == -1) {
replyDownloadProgress == -1Description
TRUEevaluated 20 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 60 times by 5 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
20-60
935#if QT_CONFIG(qml_network)-
936 replyDownloadProgress = QMetaMethod::fromSignal(&QNetworkReply::downloadProgress).methodIndex();-
937 replyFinished = QMetaMethod::fromSignal(&QNetworkReply::finished).methodIndex();-
938 const QMetaObject *ir = &QQuickPixmapReaderThreadObject::staticMetaObject;-
939 threadNetworkRequestDone = ir->indexOfSlot("networkRequestDone()");-
940#endif-
941 downloadProgress = QMetaMethod::fromSignal(&QQuickPixmapReply::downloadProgress).methodIndex();-
942 }
executed 20 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
20
943-
944 mutex.lock();-
945 threadObject = new QQuickPixmapReaderThreadObject(this);-
946 mutex.unlock();-
947-
948 processJobs();-
949 exec();-
950-
951 delete threadObject;-
952 threadObject = nullptr;-
953}
executed 80 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
80
954-
955class QQuickPixmapKey-
956{-
957public:-
958 const QUrl *url;-
959 const QSize *size;-
960 QQuickImageProviderOptions options;-
961};-
962-
963inline bool operator==(const QQuickPixmapKey &lhs, const QQuickPixmapKey &rhs)-
964{-
965 return *lhs.size == *rhs.size && *lhs.url == *rhs.url && lhs.options == rhs.options;
executed 16817 times by 39 tests: return *lhs.size == *rhs.size && *lhs.url == *rhs.url && lhs.options == rhs.options;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
16817
966}-
967-
968inline uint qHash(const QQuickPixmapKey &key)-
969{-
970 return qHash(*key.url) ^ (key.size->width()*7) ^ (key.size->height()*17) ^ (key.options.autoTransform() * 0x5c5c5c5c);
executed 38779 times by 39 tests: return qHash(*key.url) ^ (key.size->width()*7) ^ (key.size->height()*17) ^ (key.options.autoTransform() * 0x5c5c5c5c);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
38779
971}-
972-
973class QQuickPixmapStore : public QObject-
974{-
975 Q_OBJECT-
976public:-
977 QQuickPixmapStore();-
978 ~QQuickPixmapStore();-
979-
980 void unreferencePixmap(QQuickPixmapData *);-
981 void referencePixmap(QQuickPixmapData *);-
982-
983 void purgeCache();-
984-
985protected:-
986 void timerEvent(QTimerEvent *) override;-
987-
988public:-
989 QHash<QQuickPixmapKey, QQuickPixmapData *> m_cache;-
990-
991private:-
992 void shrinkCache(int remove);-
993-
994 QQuickPixmapData *m_unreferencedPixmaps;-
995 QQuickPixmapData *m_lastUnreferencedPixmap;-
996-
997 int m_unreferencedCost;-
998 int m_timerId;-
999 bool m_destroying;-
1000};-
1001Q_GLOBAL_STATIC(QQuickPixmapStore, pixmapStore);
executed 200 times by 93 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
executed 200 times by 93 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
executed 53845 times by 93 tests: return &holder.value;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
guard.load() =...c::InitializedDescription
TRUEevaluated 200 times by 93 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
FALSEnever evaluated
0-53845
1002-
1003-
1004QQuickPixmapStore::QQuickPixmapStore()-
1005 : m_unreferencedPixmaps(nullptr), m_lastUnreferencedPixmap(nullptr), m_unreferencedCost(0), m_timerId(-1), m_destroying(false)-
1006{-
1007}
executed 200 times by 93 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
200
1008-
1009QQuickPixmapStore::~QQuickPixmapStore()-
1010{-
1011 m_destroying = true;-
1012-
1013#ifndef QT_NO_DEBUG-
1014 int leakedPixmaps = 0;-
1015#endif-
1016 // Prevent unreferencePixmap() from assuming it needs to kick-
1017 // off the cache expiry timer, as we're shrinking the cache-
1018 // manually below after releasing all the pixmaps.-
1019 m_timerId = -2;-
1020-
1021 // unreference all (leaked) pixmaps-
1022 for (auto *pixmap : qAsConst(m_cache)) {-
1023 int currRefCount = pixmap->refCount;-
1024 if (currRefCount) {
currRefCountDescription
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
FALSEevaluated 74 times by 3 tests
Evaluated by:
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquickstates
20-74
1025#ifndef QT_NO_DEBUG-
1026 leakedPixmaps++;-
1027#endif-
1028 while (currRefCount > 0) {
currRefCount > 0Description
TRUEevaluated 1278 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
FALSEevaluated 20 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
20-1278
1029 pixmap->release();-
1030 currRefCount--;-
1031 }
executed 1278 times by 3 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
1278
1032 }
executed 20 times by 3 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
20
1033 }
executed 94 times by 5 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickstates
94
1034-
1035 // free all unreferenced pixmaps-
1036 while (m_lastUnreferencedPixmap) {
m_lastUnreferencedPixmapDescription
TRUEevaluated 10 times by 5 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickstates
FALSEevaluated 200 times by 93 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
10-200
1037 shrinkCache(20);-
1038 }
executed 10 times by 5 tests: end of block
Executed by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickstates
10
1039-
1040#ifndef QT_NO_DEBUG-
1041 if (leakedPixmaps && qsg_leak_check)
leakedPixmapsDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
FALSEevaluated 194 times by 90 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • ...
qsg_leak_checkDescription
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
0-194
1042 qDebug("Number of leaked pixmaps: %i", leakedPixmaps);
never executed: QMessageLogger(__FILE__, 1042, __PRETTY_FUNCTION__).debug("Number of leaked pixmaps: %i", leakedPixmaps);
0
1043#endif-
1044}
executed 200 times by 93 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
200
1045-
1046void QQuickPixmapStore::unreferencePixmap(QQuickPixmapData *data)-
1047{-
1048 Q_ASSERT(data->prevUnreferenced == nullptr);-
1049 Q_ASSERT(data->prevUnreferencedPtr == nullptr);-
1050 Q_ASSERT(data->nextUnreferenced == nullptr);-
1051-
1052 data->nextUnreferenced = m_unreferencedPixmaps;-
1053 data->prevUnreferencedPtr = &m_unreferencedPixmaps;-
1054 if (!m_destroying) // the texture factories may have been cleaned up already.
!m_destroyingDescription
TRUEevaluated 9097 times by 36 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
FALSEevaluated 20 times by 3 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
20-9097
1055 m_unreferencedCost += data->cost();
executed 9097 times by 36 tests: m_unreferencedCost += data->cost();
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
9097
1056-
1057 m_unreferencedPixmaps = data;-
1058 if (m_unreferencedPixmaps->nextUnreferenced) {
m_unreferenced...xtUnreferencedDescription
TRUEevaluated 8458 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickmaskextruder
  • tst_qquickpixmapcache
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
FALSEevaluated 659 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
659-8458
1059 m_unreferencedPixmaps->nextUnreferenced->prevUnreferenced = m_unreferencedPixmaps;-
1060 m_unreferencedPixmaps->nextUnreferenced->prevUnreferencedPtr = &m_unreferencedPixmaps->nextUnreferenced;-
1061 }
executed 8458 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickmaskextruder
  • tst_qquickpixmapcache
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
8458
1062-
1063 if (!m_lastUnreferencedPixmap)
!m_lastUnreferencedPixmapDescription
TRUEevaluated 659 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 8458 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickmaskextruder
  • tst_qquickpixmapcache
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
659-8458
1064 m_lastUnreferencedPixmap = data;
executed 659 times by 37 tests: m_lastUnreferencedPixmap = data;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
659
1065-
1066 shrinkCache(-1); // Shrink the cache in case it has become larger than cache_limit-
1067-
1068 if (m_timerId == -1 && m_unreferencedPixmaps
m_timerId == -1Description
TRUEevaluated 78 times by 36 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
FALSEevaluated 9039 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickfriction
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktrailemitter
  • tst_scenegraph
m_unreferencedPixmapsDescription
TRUEevaluated 74 times by 36 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
4-9039
1069 && !m_destroying && !QCoreApplication::closingDown()) {
!m_destroyingDescription
TRUEevaluated 74 times by 36 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
FALSEnever evaluated
!QCoreApplicat...:closingDown()Description
TRUEevaluated 74 times by 36 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
FALSEnever evaluated
0-74
1070 m_timerId = startTimer(CACHE_EXPIRE_TIME * 1000);-
1071 }
executed 74 times by 36 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
74
1072}
executed 9117 times by 37 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
9117
1073-
1074void QQuickPixmapStore::referencePixmap(QQuickPixmapData *data)-
1075{-
1076 Q_ASSERT(data->prevUnreferencedPtr);-
1077-
1078 *data->prevUnreferencedPtr = data->nextUnreferenced;-
1079 if (data->nextUnreferenced) {
data->nextUnreferencedDescription
TRUEevaluated 22 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
FALSEevaluated 215 times by 10 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_qquicktrailemitter
22-215
1080 data->nextUnreferenced->prevUnreferencedPtr = data->prevUnreferencedPtr;-
1081 data->nextUnreferenced->prevUnreferenced = data->prevUnreferenced;-
1082 }
executed 22 times by 3 tests: end of block
Executed by:
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
22
1083 if (m_lastUnreferencedPixmap == data)
m_lastUnrefere...Pixmap == dataDescription
TRUEevaluated 215 times by 10 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_qquicktrailemitter
FALSEevaluated 22 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
22-215
1084 m_lastUnreferencedPixmap = data->prevUnreferenced;
executed 215 times by 10 tests: m_lastUnreferencedPixmap = data->prevUnreferenced;
Executed by:
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_qquicktrailemitter
215
1085-
1086 data->nextUnreferenced = nullptr;-
1087 data->prevUnreferencedPtr = nullptr;-
1088 data->prevUnreferenced = nullptr;-
1089-
1090 m_unreferencedCost -= data->cost();-
1091}
executed 237 times by 10 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_qquicktrailemitter
237
1092-
1093void QQuickPixmapStore::shrinkCache(int remove)-
1094{-
1095 while ((remove > 0 || m_unreferencedCost > cache_limit) && m_lastUnreferencedPixmap) {
remove > 0Description
TRUEevaluated 778 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 22819 times by 91 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • ...
m_unreferenced... > cache_limitDescription
TRUEevaluated 8112 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedsprite
  • tst_qquickpixmapcache
  • tst_qquickspritesequence
  • tst_scenegraph
FALSEevaluated 14707 times by 91 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • ...
m_lastUnreferencedPixmapDescription
TRUEevaluated 8880 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 10 times by 5 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickstates
10-22819
1096 QQuickPixmapData *data = m_lastUnreferencedPixmap;-
1097 Q_ASSERT(data->nextUnreferenced == nullptr);-
1098-
1099 *data->prevUnreferencedPtr = nullptr;-
1100 m_lastUnreferencedPixmap = data->prevUnreferenced;-
1101 data->prevUnreferencedPtr = nullptr;-
1102 data->prevUnreferenced = nullptr;-
1103-
1104 if (!m_destroying) {
!m_destroyingDescription
TRUEevaluated 8786 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
FALSEevaluated 94 times by 5 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickstates
94-8786
1105 remove -= data->cost();-
1106 m_unreferencedCost -= data->cost();-
1107 }
executed 8786 times by 34 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
8786
1108 data->removeFromCache();-
1109 delete data;-
1110 }
executed 8880 times by 37 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
8880
1111}
executed 14717 times by 91 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • ...
14717
1112-
1113void QQuickPixmapStore::timerEvent(QTimerEvent *)-
1114{-
1115 int removalCost = m_unreferencedCost / CACHE_REMOVAL_FRACTION;-
1116-
1117 shrinkCache(removalCost);-
1118-
1119 if (m_unreferencedPixmaps == nullptr) {
m_unreferenced...aps == nullptrDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_scenegraph
FALSEnever evaluated
0-6
1120 killTimer(m_timerId);-
1121 m_timerId = -1;-
1122 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_scenegraph
6
1123}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_scenegraph
6
1124-
1125void QQuickPixmapStore::purgeCache()-
1126{-
1127 shrinkCache(m_unreferencedCost);-
1128}
executed 5584 times by 89 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • ...
5584
1129-
1130void QQuickPixmap::purgeCache()-
1131{-
1132 pixmapStore()->purgeCache();-
1133}
executed 5584 times by 89 tests: end of block
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmldebugjs
  • tst_qqmlimport
  • tst_qqmltypeloader
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickapplication
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickdynamicpropertyanimation
  • ...
5584
1134-
1135QQuickPixmapReply::QQuickPixmapReply(QQuickPixmapData *d)-
1136: data(d), engineForReader(nullptr), requestSize(d->requestSize), url(d->url), loading(false), providerOptions(d->providerOptions), redirectCount(0)-
1137{-
1138 if (finishedIndex == -1) {
finishedIndex == -1Description
TRUEevaluated 20 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 2356 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
20-2356
1139 finishedIndex = QMetaMethod::fromSignal(&QQuickPixmapReply::finished).methodIndex();-
1140 downloadProgressIndex = QMetaMethod::fromSignal(&QQuickPixmapReply::downloadProgress).methodIndex();-
1141 }
executed 20 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
20
1142}
executed 2376 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2376
1143-
1144QQuickPixmapReply::~QQuickPixmapReply()-
1145{-
1146 // note: this->data->reply must be set to zero if this->data->reply == this-
1147 // but it must be done within mutex locking, to be guaranteed to be safe.-
1148}-
1149-
1150bool QQuickPixmapReply::event(QEvent *event)-
1151{-
1152 if (event->type() == QEvent::User) {
event->type() == QEvent::UserDescription
TRUEevaluated 132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 326 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
132-326
1153-
1154 if (data) {
dataDescription
TRUEevaluated 132 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEnever evaluated
0-132
1155 Event *de = static_cast<Event *>(event);-
1156 data->pixmapStatus = (de->error == NoError) ? QQuickPixmap::Ready : QQuickPixmap::Error;
(de->error == NoError)Description
TRUEevaluated 114 times by 7 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 18 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktextedit
18-114
1157 if (data->pixmapStatus == QQuickPixmap::Ready) {
data->pixmapSt...kPixmap::ReadyDescription
TRUEevaluated 114 times by 7 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
FALSEevaluated 18 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktextedit
18-114
1158 data->textureFactory = de->textureFactory;-
1159 de->textureFactory = nullptr;-
1160 data->implicitSize = de->implicitSize;-
1161 PIXMAP_PROFILE(pixmapLoadingFinished(data->url,
never executed: end of block
executed 114 times by 7 tests: (void)0 ;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 114 times by 7 tests
Evaluated by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
0-114
1162 data->textureFactory != nullptr && data->textureFactory->textureSize().isValid() ?
executed 114 times by 7 tests: (void)0 ;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
114
1163 data->textureFactory->textureSize() :
executed 114 times by 7 tests: (void)0 ;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
114
1164 (data->requestSize.isValid() ? data->requestSize : data->implicitSize)));
executed 114 times by 7 tests: (void)0 ;
Executed by:
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
114
1165 } else {-
1166 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(data->url));
never executed: end of block
executed 18 times by 6 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktextedit
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 18 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktextedit
0-18
1167 data->errorString = de->errorString;-
1168 data->removeFromCache(); // We don't continue to cache error'd pixmaps-
1169 }
executed 18 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktextedit
18
1170-
1171 data->reply = nullptr;-
1172 emit finished();-
1173 } else {
executed 132 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
132
1174 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(url));
never executed: end of block
never executed: (void)0;
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEnever evaluated
0
1175 }-
1176-
1177 delete this;-
1178 return true;
executed 132 times by 8 tests: return true;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
132
1179 } else {-
1180 return QObject::event(event);
executed 326 times by 8 tests: return QObject::event(event);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
326
1181 }-
1182}-
1183-
1184int QQuickPixmapData::cost() const-
1185{-
1186 if (textureFactory)
textureFactoryDescription
TRUEevaluated 26906 times by 36 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
FALSEnever evaluated
0-26906
1187 return textureFactory->textureByteCount();
executed 26906 times by 36 tests: return textureFactory->textureByteCount();
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
26906
1188 return 0;
never executed: return 0;
0
1189}-
1190-
1191void QQuickPixmapData::addref()-
1192{-
1193 ++refCount;-
1194 PIXMAP_PROFILE(pixmapCountChanged<QQuickProfiler::PixmapReferenceCountChanged>(url, refCount));
never executed: end of block
executed 5571 times by 18 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktrailemitter
  • tst_scenegraph
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 5571 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktrailemitter
  • tst_scenegraph
0-5571
1195 if (prevUnreferencedPtr)
prevUnreferencedPtrDescription
TRUEevaluated 237 times by 10 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_qquicktrailemitter
FALSEevaluated 5334 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_scenegraph
237-5334
1196 pixmapStore()->referencePixmap(this);
executed 237 times by 10 tests: pixmapStore()->referencePixmap(this);
Executed by:
  • tst_qquickage
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktext
  • tst_qquicktrailemitter
237
1197}
executed 5571 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktrailemitter
  • tst_scenegraph
5571
1198-
1199void QQuickPixmapData::release()-
1200{-
1201 Q_ASSERT(refCount > 0);-
1202 --refCount;-
1203 PIXMAP_PROFILE(pixmapCountChanged<QQuickProfiler::PixmapReferenceCountChanged>(url, refCount));
never executed: end of block
executed 16879 times by 40 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 16879 times by 40 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
0-16879
1204 if (refCount == 0) {
refCount == 0Description
TRUEevaluated 11545 times by 40 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
FALSEevaluated 5334 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_scenegraph
5334-11545
1205 if (reply) {
replyDescription
TRUEevaluated 2244 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
FALSEevaluated 9301 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
2244-9301
1206 QQuickPixmapReply *cancelReply = reply;-
1207 reply->data = nullptr;-
1208 reply = nullptr;-
1209 QQuickPixmapReader::readerMutex.lock();-
1210 QQuickPixmapReader *reader = QQuickPixmapReader::existingInstance(cancelReply->engineForReader);-
1211 if (reader)
readerDescription
TRUEevaluated 2242 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpixmapcache
2-2242
1212 reader->cancel(cancelReply);
executed 2242 times by 7 tests: reader->cancel(cancelReply);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
2242
1213 QQuickPixmapReader::readerMutex.unlock();-
1214 }
executed 2244 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
2244
1215-
1216 if (pixmapStatus == QQuickPixmap::Ready) {
pixmapStatus =...kPixmap::ReadyDescription
TRUEevaluated 9177 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 2368 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
2368-9177
1217 if (inCache)
inCacheDescription
TRUEevaluated 9117 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 60 times by 4 tests
Evaluated by:
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_sharedimage
60-9117
1218 pixmapStore()->unreferencePixmap(this);
executed 9117 times by 37 tests: pixmapStore()->unreferencePixmap(this);
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
9117
1219 else-
1220 delete this;
executed 60 times by 4 tests: delete this;
Executed by:
  • tst_qquickanimatedimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_sharedimage
60
1221 } else {-
1222 removeFromCache();-
1223 delete this;-
1224 }
executed 2368 times by 9 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
2368
1225 }-
1226}
executed 16879 times by 40 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
16879
1227-
1228void QQuickPixmapData::addToCache()-
1229{-
1230 if (!inCache) {
!inCacheDescription
TRUEevaluated 11142 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
FALSEnever evaluated
0-11142
1231 QQuickPixmapKey key = { &url, &requestSize, providerOptions };-
1232 pixmapStore()->m_cache.insert(key, this);-
1233 inCache = true;-
1234 PIXMAP_PROFILE(pixmapCountChanged<QQuickProfiler::PixmapCacheCountChanged>(
never executed: end of block
executed 11142 times by 39 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 11142 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
0-11142
1235 url, pixmapStore()->m_cache.count()));
executed 11142 times by 39 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
11142
1236 }-
1237}
executed 11142 times by 39 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
11142
1238-
1239void QQuickPixmapData::removeFromCache()-
1240{-
1241 if (inCache) {
inCacheDescription
TRUEevaluated 11142 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
FALSEevaluated 124 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
124-11142
1242 QQuickPixmapKey key = { &url, &requestSize, providerOptions };-
1243 pixmapStore()->m_cache.remove(key);-
1244 inCache = false;-
1245 PIXMAP_PROFILE(pixmapCountChanged<QQuickProfiler::PixmapCacheCountChanged>(
never executed: end of block
executed 11142 times by 39 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 11142 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
0-11142
1246 url, pixmapStore()->m_cache.count()));
executed 11142 times by 39 tests: (void)0 ;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
11142
1247 }-
1248}
executed 11266 times by 39 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
11266
1249-
1250static QQuickPixmapData* createPixmapDataSync(QQuickPixmap *declarativePixmap, QQmlEngine *engine, const QUrl &url, const QSize &requestSize, const QQuickImageProviderOptions &providerOptions, bool *ok)-
1251{-
1252 if (url.scheme() == QLatin1String("image")) {
url.scheme() =...tring("image")Description
TRUEevaluated 8064 times by 4 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
FALSEevaluated 3078 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
3078-8064
1253 QSize readSize;-
1254-
1255 QQuickImageProvider::ImageType imageType = QQuickImageProvider::Invalid;-
1256 QQuickImageProvider *provider = static_cast<QQuickImageProvider *>(engine->imageProvider(imageProviderId(url)));-
1257 QQuickImageProviderWithOptions *providerV2 = QQuickImageProviderWithOptions::checkedCast(provider);-
1258 if (provider)
providerDescription
TRUEevaluated 8054 times by 4 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
10-8054
1259 imageType = provider->imageType();
executed 8054 times by 4 tests: imageType = provider->imageType();
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
8054
1260-
1261 switch (imageType) {-
1262 case QQuickImageProvider::Invalid:
executed 10 times by 1 test: case QQuickImageProvider::Invalid:
Executed by:
  • tst_qquickimageprovider
10
1263 return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions,
executed 10 times by 1 test: return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions, QQuickPixmap::tr("Invalid image provider: %1").arg(url.toString()));
Executed by:
  • tst_qquickimageprovider
10
1264 QQuickPixmap::tr("Invalid image provider: %1").arg(url.toString()));
executed 10 times by 1 test: return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions, QQuickPixmap::tr("Invalid image provider: %1").arg(url.toString()));
Executed by:
  • tst_qquickimageprovider
10
1265 case QQuickImageProvider::Texture:
never executed: case QQuickImageProvider::Texture:
0
1266 {-
1267 QQuickTextureFactory *texture = providerV2 ? providerV2->requestTexture(imageId(url), &readSize, requestSize, providerOptions)
providerV2Description
TRUEnever evaluated
FALSEnever evaluated
0
1268 : provider->requestTexture(imageId(url), &readSize, requestSize);-
1269 if (texture) {
textureDescription
TRUEnever evaluated
FALSEnever evaluated
0
1270 *ok = true;-
1271 return new QQuickPixmapData(declarativePixmap, url, texture, readSize, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
never executed: return new QQuickPixmapData(declarativePixmap, url, texture, readSize, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
0
1272 }-
1273 break;
never executed: break;
0
1274 }-
1275-
1276 case QQuickImageProvider::Image:
executed 24 times by 2 tests: case QQuickImageProvider::Image:
Executed by:
  • tst_qquickimageprovider
  • tst_sharedimage
24
1277 {-
1278 QImage image = providerV2 ? providerV2->requestImage(imageId(url), &readSize, requestSize, providerOptions)
providerV2Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_sharedimage
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
6-18
1279 : provider->requestImage(imageId(url), &readSize, requestSize);-
1280 if (!image.isNull()) {
!image.isNull()Description
TRUEevaluated 22 times by 2 tests
Evaluated by:
  • tst_qquickimageprovider
  • tst_sharedimage
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
2-22
1281 *ok = true;-
1282 return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(image), readSize, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
executed 22 times by 2 tests: return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(image), readSize, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
Executed by:
  • tst_qquickimageprovider
  • tst_sharedimage
22
1283 }-
1284 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquickimageprovider
2
1285 }-
1286 case QQuickImageProvider::Pixmap:
executed 8030 times by 3 tests: case QQuickImageProvider::Pixmap:
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
8030
1287 {-
1288 QPixmap pixmap = providerV2 ? providerV2->requestPixmap(imageId(url), &readSize, requestSize, providerOptions)
providerV2Description
TRUEnever evaluated
FALSEevaluated 8030 times by 3 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
0-8030
1289 : provider->requestPixmap(imageId(url), &readSize, requestSize);-
1290 if (!pixmap.isNull()) {
!pixmap.isNull()Description
TRUEevaluated 8028 times by 3 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
2-8028
1291 *ok = true;-
1292 return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(pixmap.toImage()), readSize, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
executed 8028 times by 3 tests: return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(pixmap.toImage()), readSize, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
8028
1293 }-
1294 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qquickimageprovider
2
1295 }-
1296 case QQuickImageProvider::ImageResponse:
never executed: case QQuickImageProvider::ImageResponse:
0
1297 {-
1298 // Fall through, ImageResponse providers never get here-
1299 Q_ASSERT(imageType != QQuickImageProvider::ImageResponse && "Sync call to ImageResponse provider");-
1300 }-
1301 }
never executed: end of block
0
1302-
1303 // provider has bad image type, or provider returned null image-
1304 return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions,
executed 4 times by 1 test: return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions, QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString()));
Executed by:
  • tst_qquickimageprovider
4
1305 QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString()));
executed 4 times by 1 test: return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions, QQuickPixmap::tr("Failed to get image from provider: %1").arg(url.toString()));
Executed by:
  • tst_qquickimageprovider
4
1306 }-
1307-
1308 QString localFile = QQmlFile::urlToLocalFileOrQrc(url);-
1309 if (localFile.isEmpty())
localFile.isEmpty()Description
TRUEevaluated 2282 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 796 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
796-2282
1310 return nullptr;
executed 2282 times by 8 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
2282
1311-
1312 QFile f(existingImageFileForPath(localFile));-
1313 QSize readSize;-
1314 QString errorString;-
1315-
1316 if (f.open(QIODevice::ReadOnly)) {
f.open(QIODevice::ReadOnly)Description
TRUEevaluated 704 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEevaluated 92 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
92-704
1317 QSGTextureReader texReader(&f, localFile);-
1318 if (backendSupport()->hasOpenGL && texReader.isTexture()) {
backendSupport()->hasOpenGLDescription
TRUEevaluated 704 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
texReader.isTexture()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEevaluated 698 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
0-704
1319 QQuickTextureFactory *factory = texReader.read();-
1320 if (factory) {
factoryDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickimage
FALSEnever evaluated
0-6
1321 *ok = true;-
1322 return new QQuickPixmapData(declarativePixmap, url, factory, factory->textureSize(), requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
executed 6 times by 1 test: return new QQuickPixmapData(declarativePixmap, url, factory, factory->textureSize(), requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);
Executed by:
  • tst_qquickimage
6
1323 } else {-
1324 errorString = QQuickPixmap::tr("Error decoding: %1").arg(url.toString());-
1325 if (f.fileName() != localFile)
f.fileName() != localFileDescription
TRUEnever evaluated
FALSEnever evaluated
0
1326 errorString += QString::fromLatin1(" (%1)").arg(f.fileName());
never executed: errorString += QString::fromLatin1(" (%1)").arg(f.fileName());
0
1327 }
never executed: end of block
0
1328 } else {-
1329 QImage image;-
1330 QQuickImageProviderOptions::AutoTransform appliedTransform = providerOptions.autoTransform();-
1331 if (readImage(url, &f, &image, &errorString, &readSize, requestSize, providerOptions, &appliedTransform)) {
readImage(url,...liedTransform)Description
TRUEevaluated 698 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
FALSEnever evaluated
0-698
1332 *ok = true;-
1333 return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(image), readSize, requestSize, providerOptions, appliedTransform);
executed 698 times by 34 tests: return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(image), readSize, requestSize, providerOptions, appliedTransform);
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • ...
698
1334 } else if (f.fileName() != localFile) {
f.fileName() != localFileDescription
TRUEnever evaluated
FALSEnever evaluated
0
1335 errorString += QString::fromLatin1(" (%1)").arg(f.fileName());-
1336 }
never executed: end of block
0
1337 }
never executed: end of block
0
1338 } else {-
1339 errorString = QQuickPixmap::tr("Cannot open: %1").arg(url.toString());-
1340 }
executed 92 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
92
1341 return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions, errorString);
executed 92 times by 6 tests: return new QQuickPixmapData(declarativePixmap, url, requestSize, providerOptions, errorString);
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
92
1342}-
1343-
1344-
1345struct QQuickPixmapNull {-
1346 QUrl url;-
1347 QSize size;-
1348};-
1349Q_GLOBAL_STATIC(QQuickPixmapNull, nullPixmap);
never executed: end of block
never executed: guard.store(QtGlobalStatic::Destroyed);
never executed: return &holder.value;
guard.load() =...c::InitializedDescription
TRUEnever evaluated
FALSEnever evaluated
0
1350-
1351QQuickPixmap::QQuickPixmap()-
1352: d(nullptr)-
1353{-
1354}
executed 6566 times by 42 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquicklistview
  • ...
6566
1355-
1356QQuickPixmap::QQuickPixmap(QQmlEngine *engine, const QUrl &url)-
1357: d(nullptr)-
1358{-
1359 load(engine, url);-
1360}
executed 10182 times by 4 tests: end of block
Executed by:
  • tst_qquickanimatedimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
10182
1361-
1362QQuickPixmap::QQuickPixmap(QQmlEngine *engine, const QUrl &url, const QSize &size)-
1363: d(nullptr)-
1364{-
1365 load(engine, url, size);-
1366}
executed 84 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
84
1367-
1368QQuickPixmap::QQuickPixmap(const QUrl &url, const QImage &image)-
1369{-
1370 d = new QQuickPixmapData(this, url, new QQuickDefaultTextureFactory(image), image.size(), QSize(), QQuickImageProviderOptions(), QQuickImageProviderOptions::UsePluginDefaultTransform);-
1371 d->addToCache();-
1372}
executed 60 times by 2 tests: end of block
Executed by:
  • tst_qquickanimatedimage
  • tst_qquickitem2
60
1373-
1374QQuickPixmap::~QQuickPixmap()-
1375{-
1376 if (d) {
dDescription
TRUEevaluated 14746 times by 40 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
FALSEevaluated 868 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickpixmapcache
868-14746
1377 d->declarativePixmaps.remove(this);-
1378 d->release();-
1379 d = nullptr;-
1380 }
executed 14746 times by 40 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • ...
14746
1381}
executed 15614 times by 45 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • ...
15614
1382-
1383bool QQuickPixmap::isNull() const-
1384{-
1385 return d == nullptr;
executed 594 times by 3 tests: return d == nullptr;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickpixmapcache
594
1386}-
1387-
1388bool QQuickPixmap::isReady() const-
1389{-
1390 return status() == Ready;
executed 253 times by 23 tests: return status() == Ready;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquicktargetdirection
  • tst_qquicktext
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
253
1391}-
1392-
1393bool QQuickPixmap::isError() const-
1394{-
1395 return status() == Error;
executed 5616 times by 13 tests: return status() == Error;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickmaskextruder
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_scenegraph
  • tst_sharedimage
5616
1396}-
1397-
1398bool QQuickPixmap::isLoading() const-
1399{-
1400 return status() == Loading;
executed 6134 times by 34 tests: return status() == Loading;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
6134
1401}-
1402-
1403QString QQuickPixmap::error() const-
1404{-
1405 if (d)
dDescription
TRUEevaluated 124 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEnever evaluated
0-124
1406 return d->errorString;
executed 124 times by 7 tests: return d->errorString;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
124
1407 else-
1408 return QString();
never executed: return QString();
0
1409}-
1410-
1411QQuickPixmap::Status QQuickPixmap::status() const-
1412{-
1413 if (d)
dDescription
TRUEevaluated 11935 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 240 times by 21 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
240-11935
1414 return d->pixmapStatus;
executed 11935 times by 38 tests: return d->pixmapStatus;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
11935
1415 else-
1416 return Null;
executed 240 times by 21 tests: return Null;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquicktargetdirection
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • tst_qquickwander
240
1417}-
1418-
1419const QUrl &QQuickPixmap::url() const-
1420{-
1421 if (d)
dDescription
TRUEnever evaluated
FALSEnever evaluated
0
1422 return d->url;
never executed: return d->url;
0
1423 else-
1424 return nullPixmap()->url;
never executed: return nullPixmap()->url;
0
1425}-
1426-
1427const QSize &QQuickPixmap::implicitSize() const-
1428{-
1429 if (d)
dDescription
TRUEevaluated 186 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquicktext
FALSEnever evaluated
0-186
1430 return d->implicitSize;
executed 186 times by 3 tests: return d->implicitSize;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquicktext
186
1431 else-
1432 return nullPixmap()->size;
never executed: return nullPixmap()->size;
0
1433}-
1434-
1435const QSize &QQuickPixmap::requestSize() const-
1436{-
1437 if (d)
dDescription
TRUEnever evaluated
FALSEnever evaluated
0
1438 return d->requestSize;
never executed: return d->requestSize;
0
1439 else-
1440 return nullPixmap()->size;
never executed: return nullPixmap()->size;
0
1441}-
1442-
1443QQuickImageProviderOptions::AutoTransform QQuickPixmap::autoTransform() const-
1444{-
1445 if (d)
dDescription
TRUEevaluated 5314 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
FALSEevaluated 100 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_qquickimageprovider
100-5314
1446 return d->appliedTransform;
executed 5314 times by 10 tests: return d->appliedTransform;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
5314
1447 else-
1448 return QQuickImageProviderOptions::UsePluginDefaultTransform;
executed 100 times by 3 tests: return QQuickImageProviderOptions::UsePluginDefaultTransform;
Executed by:
  • tst_examples
  • tst_qquickimage
  • tst_qquickimageprovider
100
1449}-
1450-
1451QQuickTextureFactory *QQuickPixmap::textureFactory() const-
1452{-
1453 if (d)
dDescription
TRUEevaluated 5197 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEevaluated 76 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
76-5197
1454 return d->textureFactory;
executed 5197 times by 8 tests: return d->textureFactory;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5197
1455-
1456 return nullptr;
executed 76 times by 2 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qquickimage
76
1457}-
1458-
1459QImage QQuickPixmap::image() const-
1460{-
1461 if (d && d->textureFactory)
dDescription
TRUEevaluated 391 times by 28 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquicktargetdirection
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktrailemitter
  • ...
FALSEnever evaluated
d->textureFactoryDescription
TRUEevaluated 333 times by 27 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquicktargetdirection
  • tst_qquicktextedit
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • ...
FALSEevaluated 58 times by 3 tests
Evaluated by:
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
0-391
1462 return d->textureFactory->image();
executed 333 times by 27 tests: return d->textureFactory->image();
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquicktargetdirection
  • tst_qquicktextedit
  • tst_qquicktrailemitter
  • tst_qquickturbulence
  • ...
333
1463 return QImage();
executed 58 times by 3 tests: return QImage();
Executed by:
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
58
1464}-
1465-
1466void QQuickPixmap::setImage(const QImage &p)-
1467{-
1468 clear();-
1469-
1470 if (!p.isNull())
!p.isNull()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickanimatedimage
FALSEevaluated 188 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
12-188
1471 d = new QQuickPixmapData(this, QQuickTextureFactory::textureFactoryForImage(p));
executed 12 times by 1 test: d = new QQuickPixmapData(this, QQuickTextureFactory::textureFactoryForImage(p));
Executed by:
  • tst_qquickanimatedimage
12
1472}
executed 200 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
200
1473-
1474void QQuickPixmap::setPixmap(const QQuickPixmap &other)-
1475{-
1476 clear();-
1477-
1478 if (other.d) {
other.dDescription
TRUEevaluated 404 times by 1 test
Evaluated by:
  • tst_qquickanimatedimage
FALSEnever evaluated
0-404
1479 d = other.d;-
1480 d->addref();-
1481 d->declarativePixmaps.insert(this);-
1482 }
executed 404 times by 1 test: end of block
Executed by:
  • tst_qquickanimatedimage
404
1483}
executed 404 times by 1 test: end of block
Executed by:
  • tst_qquickanimatedimage
404
1484-
1485int QQuickPixmap::width() const-
1486{-
1487 if (d && d->textureFactory)
dDescription
TRUEevaluated 27190 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
FALSEevaluated 644 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_sharedimage
d->textureFactoryDescription
TRUEevaluated 27138 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
FALSEevaluated 52 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickpixmapcache
52-27190
1488 return d->textureFactory->textureSize().width();
executed 27138 times by 12 tests: return d->textureFactory->textureSize().width();
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
27138
1489 else-
1490 return 0;
executed 696 times by 8 tests: return 0;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_sharedimage
696
1491}-
1492-
1493int QQuickPixmap::height() const-
1494{-
1495 if (d && d->textureFactory)
dDescription
TRUEevaluated 27134 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 560 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickshadereffect
d->textureFactoryDescription
TRUEevaluated 27102 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 32 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
32-27134
1496 return d->textureFactory->textureSize().height();
executed 27102 times by 11 tests: return d->textureFactory->textureSize().height();
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_qquickstates
  • tst_scenegraph
  • tst_sharedimage
27102
1497 else-
1498 return 0;
executed 592 times by 6 tests: return 0;
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickshadereffect
592
1499}-
1500-
1501QRect QQuickPixmap::rect() const-
1502{-
1503 if (d && d->textureFactory)
dDescription
TRUEevaluated 5055 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
FALSEnever evaluated
d->textureFactoryDescription
TRUEevaluated 5055 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-5055
1504 return QRect(QPoint(), d->textureFactory->textureSize());
executed 5055 times by 8 tests: return QRect(QPoint(), d->textureFactory->textureSize());
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickimage
  • tst_qquickitemparticle
  • tst_qquickshadereffect
  • tst_scenegraph
5055
1505 else-
1506 return QRect();
never executed: return QRect();
0
1507}-
1508-
1509void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url)-
1510{-
1511 load(engine, url, QSize(), QQuickPixmap::Cache);-
1512}
executed 10723 times by 28 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquicktargetdirection
  • tst_qquicktext
  • tst_qquicktextedit
  • ...
10723
1513-
1514void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, QQuickPixmap::Options options)-
1515{-
1516 load(engine, url, QSize(), options);-
1517}
executed 34 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickpixmapcache
34
1518-
1519void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, const QSize &size)-
1520{-
1521 load(engine, url, size, QQuickPixmap::Cache);-
1522}
executed 84 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquicktext
84
1523-
1524void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, const QSize &requestSize, QQuickPixmap::Options options)-
1525{-
1526 load(engine, url, requestSize, options, QQuickImageProviderOptions());-
1527}
executed 10959 times by 29 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimageparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquicktargetdirection
  • tst_qquicktext
  • ...
10959
1528-
1529void QQuickPixmap::load(QQmlEngine *engine, const QUrl &url, const QSize &requestSize, QQuickPixmap::Options options, const QQuickImageProviderOptions &providerOptions)-
1530{-
1531 if (d) {
dDescription
TRUEnever evaluated
FALSEevaluated 16403 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • ...
0-16403
1532 d->declarativePixmaps.remove(this);-
1533 d->release();-
1534 d = nullptr;-
1535 }
never executed: end of block
0
1536-
1537 QQuickPixmapKey key = { &url, &requestSize, providerOptions };-
1538 QQuickPixmapStore *store = pixmapStore();-
1539-
1540 QHash<QQuickPixmapKey, QQuickPixmapData *>::Iterator iter = store->m_cache.end();-
1541-
1542 // If Cache is disabled, the pixmap will always be loaded, even if there is an existing-
1543 // cached version. Unless it's an itemgrabber url, since the cache is used to pass-
1544 // the result between QQuickItemGrabResult and QQuickImage.-
1545 if (url.scheme() == itemGrabberScheme) {
url.scheme() =...mGrabberSchemeDescription
TRUEnever evaluated
FALSEevaluated 16403 times by 39 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • ...
0-16403
1546 QSize dummy;-
1547 if (requestSize != dummy)
requestSize != dummyDescription
TRUEnever evaluated
FALSEnever evaluated
0
1548 qWarning() << "Ignoring sourceSize request for image url that came from grabToImage. Use the targetSize parameter of the grabToImage() function instead.";
never executed: QMessageLogger(__FILE__, 1548, __PRETTY_FUNCTION__).warning() << "Ignoring sourceSize request for image url that came from grabToImage. Use the targetSize parameter of the grabToImage() function instead.";
0
1549 const QQuickPixmapKey grabberKey = { &url, &dummy, QQuickImageProviderOptions() };-
1550 iter = store->m_cache.find(grabberKey);-
1551 } else if (options & QQuickPixmap::Cache)
never executed: end of block
options & QQuickPixmap::CacheDescription
TRUEevaluated 16355 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • ...
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_sharedimage
0-16355
1552 iter = store->m_cache.find(key);
executed 16355 times by 38 tests: iter = store->m_cache.find(key);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedimage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • ...
16355
1553-
1554 if (iter == store->m_cache.end()) {
iter == store->m_cache.end()Description
TRUEevaluated 11236 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 5167 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktrailemitter
  • tst_scenegraph
5167-11236
1555 if (url.scheme() == QLatin1String("image")) {
url.scheme() =...tring("image")Description
TRUEevaluated 8130 times by 5 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
FALSEevaluated 3106 times by 37 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
3106-8130
1556 if (QQuickImageProvider *provider = static_cast<QQuickImageProvider *>(engine->imageProvider(imageProviderId(url)))) {
QQuickImagePro...viderId(url)))Description
TRUEevaluated 8118 times by 5 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
12-8118
1557 const bool threadedPixmaps = QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedPixmaps);-
1558 if (!threadedPixmaps && provider->imageType() == QQuickImageProvider::Pixmap) {
!threadedPixmapsDescription
TRUEnever evaluated
FALSEevaluated 8118 times by 5 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
provider->imag...ovider::PixmapDescription
TRUEnever evaluated
FALSEnever evaluated
0-8118
1559 // pixmaps can only be loaded synchronously-
1560 options &= ~QQuickPixmap::Asynchronous;-
1561 } else if (provider->flags() & QQuickImageProvider::ForceAsynchronousImageLoading) {
never executed: end of block
provider->flag...usImageLoadingDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickimageprovider
FALSEevaluated 8086 times by 5 tests
Evaluated by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
0-8086
1562 options |= QQuickPixmap::Asynchronous;-
1563 }
executed 32 times by 1 test: end of block
Executed by:
  • tst_qquickimageprovider
32
1564 }
executed 8118 times by 5 tests: end of block
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
8118
1565 }
executed 8130 times by 5 tests: end of block
Executed by:
  • tst_qquickanimatedsprite
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_sharedimage
8130
1566-
1567 if (!(options & QQuickPixmap::Asynchronous)) {
!(options & QQ...:Asynchronous)Description
TRUEevaluated 11142 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
FALSEevaluated 94 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
94-11142
1568 bool ok = false;-
1569 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingStarted>(url));
never executed: end of block
executed 11142 times by 38 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 11142 times by 38 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
0-11142
1570 d = createPixmapDataSync(this, engine, url, requestSize, providerOptions, &ok);-
1571 if (ok) {
okDescription
TRUEevaluated 8754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
FALSEevaluated 2388 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
2388-8754
1572 PIXMAP_PROFILE(pixmapLoadingFinished(url, QSize(width(), height())));
never executed: end of block
executed 8754 times by 35 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 8754 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
0-8754
1573 if (options & QQuickPixmap::Cache)
options & QQuickPixmap::CacheDescription
TRUEevaluated 8710 times by 34 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
FALSEevaluated 44 times by 3 tests
Evaluated by:
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_sharedimage
44-8710
1574 d->addToCache();
executed 8710 times by 34 tests: d->addToCache();
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
8710
1575 return;
executed 8754 times by 35 tests: return;
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • tst_qquickshadereffect
  • ...
8754
1576 }-
1577 if (d) { // loadable, but encountered error while loading
dDescription
TRUEevaluated 106 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 2282 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
106-2282
1578 PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(url));
never executed: end of block
executed 106 times by 7 tests: (void)0;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
QQuickProfiler...lePixmapCache)Description
TRUEnever evaluated
FALSEevaluated 106 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
0-106
1579 return;
executed 106 times by 7 tests: return;
Executed by:
  • tst_examples
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
106
1580 }-
1581 }
executed 2282 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
2282
1582-
1583 if (!engine)
!engineDescription
TRUEnever evaluated
FALSEevaluated 2376 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
0-2376
1584 return;
never executed: return;
0
1585-
1586-
1587 d = new QQuickPixmapData(this, url, requestSize, providerOptions, QQuickImageProviderOptions::UsePluginDefaultTransform);-
1588 if (options & QQuickPixmap::Cache)
options & QQuickPixmap::CacheDescription
TRUEevaluated 2372 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_sharedimage
4-2372
1589 d->addToCache();
executed 2372 times by 9 tests: d->addToCache();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
2372
1590-
1591 QQuickPixmapReader::readerMutex.lock();-
1592 d->reply = QQuickPixmapReader::instance(engine)->getImage(d);-
1593 QQuickPixmapReader::readerMutex.unlock();-
1594 } else {
executed 2376 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_sharedimage
2376
1595 d = *iter;-
1596 d->addref();-
1597 d->declarativePixmaps.insert(this);-
1598 }
executed 5167 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickanimatedimage
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickitemparticle
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquickspritegoal
  • tst_qquickspritesequence
  • tst_qquickstates
  • tst_qquicktext
  • tst_qquicktrailemitter
  • tst_scenegraph
5167
1599}-
1600-
1601void QQuickPixmap::clear()-
1602{-
1603 if (d) {
dDescription
TRUEevaluated 528 times by 2 tests
Evaluated by:
  • tst_qquickanimatedimage
  • tst_qquickpixmapcache
FALSEevaluated 278 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimatedimage
278-528
1604 d->declarativePixmaps.remove(this);-
1605 d->release();-
1606 d = nullptr;-
1607 }
executed 528 times by 2 tests: end of block
Executed by:
  • tst_qquickanimatedimage
  • tst_qquickpixmapcache
528
1608}
executed 806 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimatedimage
  • tst_qquickpixmapcache
806
1609-
1610void QQuickPixmap::clear(QObject *obj)-
1611{-
1612 if (d) {
dDescription
TRUEevaluated 327 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktrailemitter
FALSEevaluated 5672 times by 35 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • tst_qquickrectangleextruder
  • ...
327-5672
1613 if (d->reply)
d->replyDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpixmapcache
FALSEevaluated 325 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickparticlegroup
  • tst_qquickshadereffect
  • tst_qquicktrailemitter
2-325
1614 QObject::disconnect(d->reply, nullptr, obj, nullptr);
executed 2 times by 1 test: QObject::disconnect(d->reply, nullptr, obj, nullptr);
Executed by:
  • tst_qquickpixmapcache
2
1615 d->declarativePixmaps.remove(this);-
1616 d->release();-
1617 d = nullptr;-
1618 }
executed 327 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_qquickparticlegroup
  • tst_qquickpixmapcache
  • tst_qquickshadereffect
  • tst_qquicktrailemitter
327
1619}
executed 5999 times by 36 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickborderimage
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • tst_qquickcustomparticle
  • tst_qquickellipseextruder
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickimage
  • tst_qquickimageparticle
  • tst_qquickimageprovider
  • tst_qquickitemparticle
  • tst_qquicklineextruder
  • tst_qquickmaskextruder
  • tst_qquickparticlegroup
  • tst_qquickparticlesystem
  • tst_qquickpixmapcache
  • tst_qquickpointattractor
  • tst_qquickpointdirection
  • ...
5999
1620-
1621bool QQuickPixmap::isCached(const QUrl &url, const QSize &requestSize, const QQuickImageProviderOptions &options)-
1622{-
1623 QQuickPixmapKey key = { &url, &requestSize, options };-
1624 QQuickPixmapStore *store = pixmapStore();-
1625-
1626 return store->m_cache.contains(key);
executed 220 times by 1 test: return store->m_cache.contains(key);
Executed by:
  • tst_qquickanimatedimage
220
1627}-
1628-
1629bool QQuickPixmap::connectFinished(QObject *object, const char *method)-
1630{-
1631 if (!d || !d->reply) {
!dDescription
TRUEnever evaluated
FALSEevaluated 34 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
!d->replyDescription
TRUEnever evaluated
FALSEevaluated 34 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
0-34
1632 qWarning("QQuickPixmap: connectFinished() called when not loading.");-
1633 return false;
never executed: return false;
0
1634 }-
1635-
1636 return QObject::connect(d->reply, SIGNAL(finished()), object, method);
executed 34 times by 4 tests: return QObject::connect(d->reply, qFlagLocation("2""finished()" "\0" __FILE__ ":" "1636"), object, method);
Executed by:
  • tst_examples
  • tst_qquickpixmapcache
  • tst_qquicktext
  • tst_qquicktextedit
34
1637}-
1638-
1639bool QQuickPixmap::connectFinished(QObject *object, int method)-
1640{-
1641 if (!d || !d->reply) {
!dDescription
TRUEnever evaluated
FALSEevaluated 152 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
!d->replyDescription
TRUEnever evaluated
FALSEevaluated 152 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
0-152
1642 qWarning("QQuickPixmap: connectFinished() called when not loading.");-
1643 return false;
never executed: return false;
0
1644 }-
1645-
1646 return QMetaObject::connect(d->reply, QQuickPixmapReply::finishedIndex, object, method);
executed 152 times by 7 tests: return QMetaObject::connect(d->reply, QQuickPixmapReply::finishedIndex, object, method);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
152
1647}-
1648-
1649bool QQuickPixmap::connectDownloadProgress(QObject *object, const char *method)-
1650{-
1651 if (!d || !d->reply) {
!dDescription
TRUEnever evaluated
FALSEnever evaluated
!d->replyDescription
TRUEnever evaluated
FALSEnever evaluated
0
1652 qWarning("QQuickPixmap: connectDownloadProgress() called when not loading.");-
1653 return false;
never executed: return false;
0
1654 }-
1655-
1656 return QObject::connect(d->reply, SIGNAL(downloadProgress(qint64,qint64)), object, method);
never executed: return QObject::connect(d->reply, qFlagLocation("2""downloadProgress(qint64,qint64)" "\0" __FILE__ ":" "1656"), object, method);
0
1657}-
1658-
1659bool QQuickPixmap::connectDownloadProgress(QObject *object, int method)-
1660{-
1661 if (!d || !d->reply) {
!dDescription
TRUEnever evaluated
FALSEevaluated 152 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
!d->replyDescription
TRUEnever evaluated
FALSEevaluated 152 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
0-152
1662 qWarning("QQuickPixmap: connectDownloadProgress() called when not loading.");-
1663 return false;
never executed: return false;
0
1664 }-
1665-
1666 return QMetaObject::connect(d->reply, QQuickPixmapReply::downloadProgressIndex, object, method);
executed 152 times by 7 tests: return QMetaObject::connect(d->reply, QQuickPixmapReply::downloadProgressIndex, object, method);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickanchors
  • tst_qquickborderimage
  • tst_qquickimage
  • tst_qquickimageprovider
  • tst_sharedimage
152
1667}-
1668-
1669QT_END_NAMESPACE-
1670-
1671#include <qquickpixmapcache.moc>-
1672-
1673#include "moc_qquickpixmapcache_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0