path: root/src/sql/kernel/qsqlindex.cpp
diff options
authorMarc Mutz <>2015-06-15 13:00:37 +0200
committerMarc Mutz <>2015-06-28 15:56:02 +0000
commit435a3d77415d6b9f859839edd907df17ee54f569 (patch)
treeb00e4ac048bbf952ef53eaff12c03ecd49afa736 /src/sql/kernel/qsqlindex.cpp
parent027571c8c3efe8b1451fb73b74be7e617db1899f (diff)
QSqlIndex: replace QList<bool> with QVector<bool>
QList<bool> uses from 400% (32-bit platforms) to 800% (64-bit) more per-element memory than QVector<bool>. 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 <>
Diffstat (limited to 'src/sql/kernel/qsqlindex.cpp')
1 files changed, 3 insertions, 0 deletions
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 6: remove the static assertion, the 'sorts' field was changed from QList to QVector in Qt 5.6
+Q_STATIC_ASSERT((sizeof(QList<bool>) == sizeof(QVector<bool>)));
\class QSqlIndex
\brief The QSqlIndex class provides functions to manipulate and