From 0e168f2c4e6f4ce3b98e86d9b140ee9fc3a9cf00 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Fri, 3 Feb 2017 14:36:42 +0300 Subject: Use nullptr in qDBusRegisterMetaType ... to make user code buildable with gcc [-Werror=zero-as-null-pointer-constant]. Change-Id: Ifef52e406c1f7d5a260612ec27922d1805aea6e2 Reviewed-by: Marc Mutz --- src/dbus/qdbusmetatype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dbus') diff --git a/src/dbus/qdbusmetatype.h b/src/dbus/qdbusmetatype.h index 9f3d9019d7..e241553bb4 100644 --- a/src/dbus/qdbusmetatype.h +++ b/src/dbus/qdbusmetatype.h @@ -74,7 +74,7 @@ void qDBusDemarshallHelper(const QDBusArgument &arg, T *t) template int qDBusRegisterMetaType( #ifndef Q_QDOC - T * /* dummy */ = 0 + T * /* dummy */ = nullptr #endif ) { -- cgit v1.2.3 From dbc3d8e15e7a158b540370d9f864fafdb55eddb4 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 6 Jan 2016 10:01:07 +0100 Subject: 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 --- src/dbus/qdbusconnection_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dbus') diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index a63e976f99..875bcd1421 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -107,7 +107,7 @@ public: // QDBusConnectionPrivate holds the DBusConnection and // can have many QDBusConnection objects referring to it -class QDBusConnectionPrivate: public QObject +class Q_AUTOTEST_EXPORT QDBusConnectionPrivate: public QObject { Q_OBJECT public: -- cgit v1.2.3