summaryrefslogtreecommitdiffstats
path: root/src/sql/models
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-06 10:01:07 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-02-07 08:32:53 +0000
commitdbc3d8e15e7a158b540370d9f864fafdb55eddb4 (patch)
treea0c4dee6e4f5ae5a55ae7a10790c7dd0bb0ce252 /src/sql/models
parent2982d327f7c51f448e91e12da29179d980027931 (diff)
Unbreak ubsan developer-build
Clang 3.8's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QDBusConnectionPrivate is a polymorphic non-exported class, so this failed at link-time. Ditto for the other case. Fix by autotest-exporting the classes. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU, and the ctor, just because it's the correct thing to do. Change-Id: I991f81f88d2a48e85d94d9f3ac61473c0b7056d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/sql/models')
-rw-r--r--src/sql/models/qsqltablemodel.cpp5
-rw-r--r--src/sql/models/qsqltablemodel_p.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 9932fb75e3..8166613e53 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -55,6 +55,11 @@ QT_BEGIN_NAMESPACE
typedef QSqlTableModelSql Sql;
+QSqlTableModelPrivate::~QSqlTableModelPrivate()
+{
+
+}
+
/*! \internal
Populates our record with values.
*/
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index 4a79d5db36..3b64cdfa47 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-class QSqlTableModelPrivate: public QSqlQueryModelPrivate
+class Q_AUTOTEST_EXPORT QSqlTableModelPrivate: public QSqlQueryModelPrivate
{
Q_DECLARE_PUBLIC(QSqlTableModel)
@@ -69,6 +69,8 @@ public:
strategy(QSqlTableModel::OnRowChange),
busyInsertingRows(false)
{}
+ ~QSqlTableModelPrivate();
+
void clear();
virtual void clearCache();
QSqlRecord record(const QVector<QVariant> &values) const;