From 9e4cefd82d3c4f67f8f182ed3956f5e92e4356e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Mon, 30 Nov 2009 09:49:01 +0100 Subject: Revert "Compile fix for win32-icc." This reverts commit db5e4496229a776768464d1d3d2e1f8e81bd6ba0. --- src/corelib/kernel/qobject.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 4321c59..30cd011 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -153,15 +153,6 @@ QObjectPrivate::QObjectPrivate(int version) hasGuards = false; } -#ifdef Q_CC_INTEL -/* Workaround for a bug in win32-icc where it seems to inline ~QObjectPrivate too aggressive. - When icc compiles QtGui, it inlines ~QObjectPrivate so that it would generate a call to - ~QObjectData. However, ~QObjectData is not exported from QtCore, so it does not link. - See also QTBUG-5145 for info on how this manifested itself. - */ -# pragma auto_inline(off) -#endif - QObjectPrivate::~QObjectPrivate() { delete static_cast(metaObject); @@ -173,9 +164,6 @@ QObjectPrivate::~QObjectPrivate() delete extraData; #endif } -#ifdef Q_CC_INTEL -# pragma auto_inline(on) -#endif int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) { -- cgit v0.12 From 2e3ecbb0b401aa29d4bbc2fe5df8cfb9f541a693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Fri, 4 Dec 2009 16:16:49 +0100 Subject: Make sure that QtGui links with QtCore for the win32-icc mkspec. Fix it by exporting QObjectData. Since this is a compiler bug we will only export it for the compiler that has this problem. (Intel Compiler on Windows) The Intel compiler seems to inline the destructor of QObject (or at least parts of it) even if it is declared virtual. Thus, it seems that the destruction of the QScopedPointer member is inlined into QtGui, and that code will eventually call the destructor of QObjectData, and since QObjectData was not exported from QtCore it would crash. Reviewed-by: Olivier Goffart --- src/corelib/kernel/qobject.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 340498f..68475e5 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -91,7 +91,11 @@ template inline QList qFindChildren(const QObject *, const QRegEx # endif #endif +#if defined(__INTEL_COMPILER) && defined(Q_OS_WIN) +class Q_CORE_EXPORT QObjectData { +#else class QObjectData { +#endif public: virtual ~QObjectData() = 0; QObject *q_ptr; -- cgit v0.12