From dde22b4828108bf8ef67e73dac25e8010f0b5bc3 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 7 May 2020 08:40:57 +0200 Subject: [PATCH] Fix build for QSet. --- .travis.yml | 3 --- resources/text/CHANGELOG | 2 -- .../services/abstract/cacheforserviceroot.cpp | 12 ++++++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0abd66607..117bdddd2 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: cpp osx_image: xcode9.4 -sudo: required dist: xenial os: - linux @@ -15,7 +14,6 @@ notifications: deploy: - provider: releases file_glob: true - skip_cleanup: true api_key: $GH_TOKEN file: - rssguard-build/src/rssguard/rss*.AppImage @@ -27,7 +25,6 @@ deploy: file: .travis-bintray-desc.json user: martinrotter key: $BINTRAY_KEY - skip_cleanup: true on: all_branches: true diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index cfed3757e..94382a374 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -8,7 +8,6 @@ Fixed/changed: ▪ Translations synced. ▪ Big code refactoring, fixed almost all usages of Qt deprecated code. ▪ Completely overhauled Appveyor/Travis build scripts which are now more reliable. -▪ 3.6.0 ————— @@ -36,7 +35,6 @@ Fixed/changed: ▪ Tray icon now shows correct number of unread messages upon app startup. ▪ Some resources are now installed to correct locations when using NSIS installer. ▪ Many fixes for build scripts for dev builds. -▪ 3.5.9 ————— diff --git a/src/librssguard/services/abstract/cacheforserviceroot.cpp b/src/librssguard/services/abstract/cacheforserviceroot.cpp index a48140521..11df5a2a5 100644 --- a/src/librssguard/services/abstract/cacheforserviceroot.cpp +++ b/src/librssguard/services/abstract/cacheforserviceroot.cpp @@ -22,8 +22,14 @@ void CacheForServiceRoot::addMessageStatesToCache(const QList& ids_of_m // Store changes, they will be sent to server later. list_act.append(ids_of_messages); + +#if QT_VERSION >= 0x050E00 // Qt >= 5.14.0 QSet set_act(list_act.begin(), list_act.end()); QSet set_other(list_other.begin(), list_other.end()); +#else + QSet set_act = list_act.toSet(); + QSet set_other = list_other.toSet(); +#endif // Now, we want to remove all IDS from list_other, which are contained in list. set_other -= set_act; @@ -43,8 +49,14 @@ void CacheForServiceRoot::addMessageStatesToCache(const QStringList& ids_of_mess // Store changes, they will be sent to server later. list_act.append(ids_of_messages); + +#if QT_VERSION >= 0x050E00 // Qt >= 5.14.0 QSet set_act(list_act.begin(), list_act.end()); QSet set_other(list_other.begin(), list_other.end()); +#else + QSet set_act = list_act.toSet(); + QSet set_other = list_other.toSet(); +#endif // Now, we want to remove all IDS from list_other, which are contained in list. set_other -= set_act;