diff --git a/src/sql/kernel/qsqlindex.cpp b/src/sql/kernel/qsqlindex.cpp index 53e13c85e6..bb80cf3e03 100644 --- a/src/sql/kernel/qsqlindex.cpp +++ b/src/sql/kernel/qsqlindex.cpp @@ -38,6 +38,9 @@ QT_BEGIN_NAMESPACE +// ### Qt 6: remove the static assertion, the 'sorts' field was changed from QList to QVector in Qt 5.6 +Q_STATIC_ASSERT((sizeof(QList) == sizeof(QVector))); + /*! \class QSqlIndex \brief The QSqlIndex class provides functions to manipulate and diff --git a/src/sql/kernel/qsqlindex.h b/src/sql/kernel/qsqlindex.h index d3d4a7c9aa..4a81d48161 100644 --- a/src/sql/kernel/qsqlindex.h +++ b/src/sql/kernel/qsqlindex.h @@ -36,7 +36,10 @@ #include #include +#include +#if QT_DEPRECATED_SINCE(5,6) #include +#endif QT_BEGIN_NAMESPACE @@ -63,7 +66,7 @@ private: QString createField(int i, const QString& prefix, bool verbose) const; QString cursor; QString nm; - QList sorts; + QVector sorts; }; QT_END_NAMESPACE