diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-06-03 16:57:37 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-06-08 08:48:59 +0000 |
commit | 6de290a188fc8fbdb9b39ae0fbc1e95e058314fb (patch) | |
tree | 58223c49eb1502192d335f42c338554fe6dd27f7 /src/plugins/qmlprofiler/pixmapcachemodel.h | |
parent | a0f956f0509a68d7eaec718bed294661bca49996 (diff) |
QmlProfiler: Add tests for pixmap cache model
Change-Id: Ic3114f6cd205434e2a489112d070300a3c842352
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/pixmapcachemodel.h')
-rw-r--r-- | src/plugins/qmlprofiler/pixmapcachemodel.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.h b/src/plugins/qmlprofiler/pixmapcachemodel.h index bf0626caccc..cdbfee49bbc 100644 --- a/src/plugins/qmlprofiler/pixmapcachemodel.h +++ b/src/plugins/qmlprofiler/pixmapcachemodel.h @@ -44,14 +44,18 @@ public: ToBeCached, // After determining the pixmap is to be cached but before knowing its size Cached, // After caching a pixmap or determining the size of a ToBeCached pixmap Uncacheable, // If loading failed without ToBeCached or after a corrupt pixmap has been uncached - Corrupt // If after ToBeCached we learn that loading failed + Corrupt, // If after ToBeCached we learn that loading failed + + MaximumCacheState }; enum LoadState { Initial, Loading, Finished, - Error + Error, + + MaximumLoadState }; struct PixmapState { @@ -105,11 +109,15 @@ public: QVariantMap details(int index) const override; -protected: void loadEvent(const QmlEvent &event, const QmlEventType &type) override; void finalize() override; void clear() override; +#ifdef WITH_TESTS + LoadState loadState(int index) const; + CacheState cacheState(int index) const; +#endif + private: void computeMaxCacheSize(); void resizeUnfinishedLoads(); |