forked from qt-creator/qt-creator
Fix compilation with Qt 5.13
Change-Id: I6e95bf74dc3a123aa635f0a44a2ea357a6dd7da2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
@@ -1249,20 +1249,20 @@ OutputIterator set_union(InputIterator1 first1,
|
|||||||
template <class T>
|
template <class T>
|
||||||
QSet<T> toSet(const QList<T> &list)
|
QSet<T> toSet(const QList<T> &list)
|
||||||
{
|
{
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 13, 0))
|
#if (QT_VERSION <= QT_VERSION_CHECK(5, 13, 0))
|
||||||
return list.toSet();
|
return list.toSet();
|
||||||
#else
|
#else
|
||||||
return QSet<T>{list.begin(), list.end()};
|
return QSet<T>(list.begin(), list.end());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
QList<T> toList(const QSet<T> &set)
|
QList<T> toList(const QSet<T> &set)
|
||||||
{
|
{
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 13, 0))
|
#if (QT_VERSION <= QT_VERSION_CHECK(5, 13, 0))
|
||||||
return set.toList();
|
return set.toList();
|
||||||
#else
|
#else
|
||||||
return QList<T>{set.begin(), set.end()};
|
return QList<T>(set.begin(), set.end());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user