mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Fix Qt deprecation warn for QList::fromSet()
Fix the following warning from Qt 5.14.1: error: ‘static QList<T> QList<T>::fromSet(const QSet<T>&) [with T = QString]’ is deprecated: Use QList<T>(set.begin(), set.end()) instead. [-Werror=deprecated-declarations] Regarding QList::fromSet(), the documentation now states the following [1]: Since Qt 5.14, range constructors are available for Qt's generic container classes and should be used in place of this method. [1] https://doc.qt.io/qt-5/qlist.html
This commit is contained in:
parent
5e21a8fbf7
commit
690c671b1d
@ -336,7 +336,11 @@ QStringList texFileList(QString const & filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove duplicates
|
// remove duplicates
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
|
return QList<QString>(set.begin(), set.end());
|
||||||
|
#else
|
||||||
return QList<QString>::fromSet(set);
|
return QList<QString>::fromSet(set);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QString const externalLineEnding(docstring const & str)
|
QString const externalLineEnding(docstring const & str)
|
||||||
|
Loading…
Reference in New Issue
Block a user