From e0ab94b5251e732d4bea553f2d6e943f5d714720 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Tue, 24 May 2016 22:02:02 +0200 Subject: Compile fix: for OpenBSD: not included by On OpenBSD, isn't included in , so that leads to compile errors on files that include qcore_unix_p.h: qcore_unix_p.h:335:69: error: 'fd_set' has not been declared Just move the whole select include section from qcore_unix.cpp, no functional changes. The patch is adapted from OpenBSD ports maintainer Vadim Zhukov patch for qt ports. Change-Id: I35ba693440b1c1644bcfcdb69823e2b37870ad97 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcore_unix.cpp | 10 ---------- src/corelib/kernel/qcore_unix_p.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp index 5695cb3ec5..1bcb4720c2 100644 --- a/src/corelib/kernel/qcore_unix.cpp +++ b/src/corelib/kernel/qcore_unix.cpp @@ -34,16 +34,6 @@ #include "qcore_unix_p.h" #include "qelapsedtimer.h" -#ifdef Q_OS_NACL -#elif !defined (Q_OS_VXWORKS) -# if !defined(Q_OS_HPUX) || defined(__ia64) -# include -# endif -# include -#else -# include -#endif - #include #ifdef Q_OS_MAC diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h index f80dcb5a50..05711354ff 100644 --- a/src/corelib/kernel/qcore_unix_p.h +++ b/src/corelib/kernel/qcore_unix_p.h @@ -58,6 +58,16 @@ #include #include +#ifdef Q_OS_NACL +#elif !defined (Q_OS_VXWORKS) +# if !defined(Q_OS_HPUX) || defined(__ia64) +# include +# endif +# include +#else +# include +#endif + #include #include #include -- cgit v1.2.3 From 6d31d3e7effabcc998792283249d46f5c0d73b3d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 18 May 2016 20:28:33 -0700 Subject: Fix build with ICC on OS X: __Z18qt_getQtMetaObjectv was undefiend It's inline, but the compiler did not inline it properly from Objective C++ sources. Undefined symbols for architecture x86_64: "__Z18qt_getQtMetaObjectv", referenced from: __ZN2Qt20qt_getEnumMetaObjectENS_15ScrollBarPolicyE in qlocale_mac.o ... Change-Id: Ie9fd7afe060b4e4a8052fffd144fda60c50a9779 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Thiago Macieira --- src/corelib/kernel/qobject.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 771d2f5ea0..b39eefa795 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -444,8 +444,7 @@ protected: QScopedPointer d_ptr; static const QMetaObject staticQtMetaObject; - friend inline const QMetaObject *qt_getQtMetaObject() Q_DECL_NOEXCEPT - { return &staticQtMetaObject; } + friend inline const QMetaObject *qt_getQtMetaObject() Q_DECL_NOEXCEPT; friend struct QMetaObject; friend struct QMetaObjectPrivate; @@ -476,6 +475,9 @@ inline QMetaObject::Connection QObject::connect(const QObject *asender, const ch const char *amember, Qt::ConnectionType atype) const { return connect(asender, asignal, this, amember, atype); } +inline const QMetaObject *qt_getQtMetaObject() Q_DECL_NOEXCEPT +{ return &QObject::staticQtMetaObject; } + #ifndef QT_NO_USERDATA class Q_CORE_EXPORT QObjectUserData { public: -- cgit v1.2.3 From 32c301e2296c5b3ba31528e6d92b521d43a216e9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 29 May 2016 17:45:05 -0300 Subject: Fix crash when connecting a non-PMF with Qt::UniqueConnection... ...if a PMF connection had already happened. Since UniqueConnection isn't implemented for non-PMFs (functors and lambdas aren't comparable, even if static member functions or non-member functions are), we pass a null pointer for comparison argument. The disconnect() code already protected against a null pointer there, but not the connect code path with Qt::UniqueConnection Change-Id: I87e17314d8b24ae983b1fffd145324beced0494d Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Dario Freddi --- src/corelib/kernel/qobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index d97f8d0ef1..a21dbffad5 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4683,7 +4683,7 @@ QMetaObject::Connection QObjectPrivate::connectImpl(const QObject *sender, int s QOrderedMutexLocker locker(signalSlotLock(sender), signalSlotLock(receiver)); - if (type & Qt::UniqueConnection) { + if (type & Qt::UniqueConnection && slot) { QObjectConnectionListVector *connectionLists = QObjectPrivate::get(s)->connectionLists; if (connectionLists && connectionLists->count() > signal_index) { const QObjectPrivate::Connection *c2 = -- cgit v1.2.3