From 435a3d77415d6b9f859839edd907df17ee54f569 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 15 Jun 2015 13:00:37 +0200 Subject: QSqlIndex: replace QList with QVector QList uses from 400% (32-bit platforms) to 800% (64-bit) more per-element memory than QVector. This change is binary compatible, since QList and QVector have the same size, and the QList field was not referenced from inline functions. This includes all relevant special member functions, since they are all out-of-line (and move assignment and move constructor are disabled by used-defined copy assignment and copy constructors, resp.). The header is unchanged from Qt 5.0, so there were also no past inline users of the member. Change-Id: I3a94ddc73a4f388031dfd4fce3fedccc507a39c7 Reviewed-by: Mark Brand --- src/sql/kernel/qsqlindex.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sql/kernel/qsqlindex.cpp') 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 -- cgit v1.2.3