summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-06 10:01:07 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-01-06 13:54:45 +0000
commitcaee8f6107ea0a1615c6fdb54c5e9ffd69cd76fe (patch)
tree91c9d834ad845391a0c10997c364f007d740fa36 /src/widgets/widgets
parent6060ffff88fd4345aa5e89b6e3d761704379ad4e (diff)
Unbreak ubsan developer-build
GCC 5.3'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. QFileDialogPrivate is a polymorphic non-exported class, so this failed at link-time. Ditto for the other cases. Fix by autotest-exporting the classs. 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: I2b7dba776282a2809c80eb2bc36440d7d698f926 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp4
-rw-r--r--src/widgets/widgets/qdatetimeedit_p.h3
-rw-r--r--src/widgets/widgets/qlabel_p.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 42987df3ec..abee788a46 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -1687,6 +1687,10 @@ QDateTimeEditPrivate::QDateTimeEditPrivate()
#endif
}
+QDateTimeEditPrivate::~QDateTimeEditPrivate()
+{
+}
+
void QDateTimeEditPrivate::updateTimeSpec()
{
minimum = minimum.toDateTime().toTimeSpec(spec);
diff --git a/src/widgets/widgets/qdatetimeedit_p.h b/src/widgets/widgets/qdatetimeedit_p.h
index 50e2cde8cc..4a6014000b 100644
--- a/src/widgets/widgets/qdatetimeedit_p.h
+++ b/src/widgets/widgets/qdatetimeedit_p.h
@@ -62,11 +62,12 @@
QT_BEGIN_NAMESPACE
class QCalendarPopup;
-class QDateTimeEditPrivate : public QAbstractSpinBoxPrivate, public QDateTimeParser
+class Q_AUTOTEST_EXPORT QDateTimeEditPrivate : public QAbstractSpinBoxPrivate, public QDateTimeParser
{
Q_DECLARE_PUBLIC(QDateTimeEdit)
public:
QDateTimeEditPrivate();
+ ~QDateTimeEditPrivate();
void init(const QVariant &var);
void readLocaleSettings();
diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h
index bd7a9d1e8f..b4da56c290 100644
--- a/src/widgets/widgets/qlabel_p.h
+++ b/src/widgets/widgets/qlabel_p.h
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
-class QLabelPrivate : public QFramePrivate
+class Q_AUTOTEST_EXPORT QLabelPrivate : public QFramePrivate
{
Q_DECLARE_PUBLIC(QLabel)
public: