From caee8f6107ea0a1615c6fdb54c5e9ffd69cd76fe Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 6 Jan 2016 10:01:07 +0100 Subject: 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) --- src/widgets/dialogs/qfontdialog_p.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/widgets/dialogs/qfontdialog_p.h') diff --git a/src/widgets/dialogs/qfontdialog_p.h b/src/widgets/dialogs/qfontdialog_p.h index e456faaa61..7b92b67f5c 100644 --- a/src/widgets/dialogs/qfontdialog_p.h +++ b/src/widgets/dialogs/qfontdialog_p.h @@ -65,14 +65,13 @@ class QGroupBox; class QLabel; class QLineEdit; -class QFontDialogPrivate : public QDialogPrivate +class Q_AUTOTEST_EXPORT QFontDialogPrivate : public QDialogPrivate { Q_DECLARE_PUBLIC(QFontDialog) public: - inline QFontDialogPrivate() - : writingSystem(QFontDatabase::Any), options(new QFontDialogOptions) - { } + QFontDialogPrivate(); + ~QFontDialogPrivate(); QPlatformFontDialogHelper *platformFontDialogHelper() const { return static_cast(platformHelper()); } -- cgit v1.2.3