From 6c0463d114bcb2415f2127a3839ae5ec006d7c95 Mon Sep 17 00:00:00 2001 From: reionwong Date: Wed, 1 Sep 2021 21:56:26 +0800 Subject: [PATCH] Fix Qt5.14 compilation --- model/foldermodel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/foldermodel.cpp b/model/foldermodel.cpp index 74e6ff3..d5b21b1 100644 --- a/model/foldermodel.cpp +++ b/model/foldermodel.cpp @@ -373,7 +373,11 @@ QStringList FolderModel::filterMimeTypes() const void FolderModel::setFilterMimeTypes(const QStringList &mimeList) { - QSet set(mimeList.begin(), mimeList.end()); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + const QSet &set = QSet::fromList(mimeList); +#else + const QSet set(mimeList.constBegin(), mimeList.constEnd()); +#endif if (m_mimeSet != set) { m_mimeSet = set;