adopt for Qt6

This commit is contained in:
2023-11-01 20:59:22 +03:00
parent c73be2a29c
commit 106d7c6c93
4 changed files with 31 additions and 1 deletions

View File

@@ -193,11 +193,13 @@ inline QVector<T> PI2QVector(const PIVector<T> & v) {
ret << v[i];
return ret;
}
#if QT_VERSION_MAJOR == 5
template<typename T>
inline PIVector<T> Q2PIVector(const QVector<T> & v) {
if (v.isEmpty()) return PIVector<T>();
return PIVector<T>(v.constData(), (size_t)v.size());
}
#endif
template<typename T>
inline PIVector<T> Q2PIVector(const QList<T> & v) {
if (v.isEmpty()) return PIVector<T>();