Fix Qt5.14 compilation

This commit is contained in:
reionwong 2021-09-01 21:56:26 +08:00
parent 680b1428a1
commit 6c0463d114

View file

@ -373,7 +373,11 @@ QStringList FolderModel::filterMimeTypes() const
void FolderModel::setFilterMimeTypes(const QStringList &mimeList) void FolderModel::setFilterMimeTypes(const QStringList &mimeList)
{ {
QSet<QString> set(mimeList.begin(), mimeList.end()); #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
const QSet<QString> &set = QSet<QString>::fromList(mimeList);
#else
const QSet<QString> set(mimeList.constBegin(), mimeList.constEnd());
#endif
if (m_mimeSet != set) { if (m_mimeSet != set) {
m_mimeSet = set; m_mimeSet = set;