forked from qt-creator/qt-creator
Remove dead code "< QT_VERSION_CHECK(5, 14, 0)"
Qt Creator required Qt 5.14 or higher. Let's removed the #idef-ed code for building against lower Qt versions. Add a comment in porting.h where we still need such code for sdktool. Change-Id: Ib330275208eec4a2f285b4b9f480530c171f538a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1283,37 +1283,21 @@ OutputIterator set_union(InputIterator1 first1,
|
||||
template <class T>
|
||||
QSet<T> toSet(const QList<T> &list)
|
||||
{
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||
return list.toSet();
|
||||
#else
|
||||
return QSet<T>(list.begin(), list.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
template<class T>
|
||||
QSet<T> toSet(const QVector<T> &vec)
|
||||
{
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||
QSet<T> result;
|
||||
for (const T &p : vec) {
|
||||
result.insert(p);
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
return QSet<T>(vec.begin(), vec.end());
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
QList<T> toList(const QSet<T> &set)
|
||||
{
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||
return set.toList();
|
||||
#else
|
||||
return QList<T>(set.begin(), set.end());
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class Key, class T>
|
||||
|
||||
Reference in New Issue
Block a user