aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <[email protected]>2017-08-26 14:01:58 +0200
committerLuigi Toscano <[email protected]>2017-08-26 14:01:58 +0200
commit5f2757aee21e707a3c461fce02f67d474832e615 (patch)
treed2de4e03abef0a112f0dde2274a2636292f46936
parent3dc41085def2858f93e6df5fb226bb26f502c4c3 (diff)
Q_FALLTHROUGH is only available from Qt>=5.8
-rw-r--r--cache.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cache.cpp b/cache.cpp
index 2a4bce0..37e72f9 100644
--- a/cache.cpp
+++ b/cache.cpp
@@ -29,6 +29,7 @@
#include <QDir>
#include <QBuffer>
+#include <QtGlobal>
#include "tag.h"
#include "searchplaylist.h"
@@ -83,7 +84,9 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static
switch(version) {
case 3:
dataStreamVersion = QDataStream::Qt_4_3;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
Q_FALLTHROUGH();
+#endif
case 1:
case 2:
@@ -320,7 +323,9 @@ bool Cache::prepareToLoadCachedItems()
switch(version) {
case 2:
dataStreamVersion = CacheDataStream::Qt_4_3;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
Q_FALLTHROUGH();
+#endif
// Other than that we're compatible with cache v1, so fallthrough
// to setCacheVersion