From 53d57395349345c8e7e24ff2be13503f5704c592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Mon, 23 Nov 2009 15:39:31 +0100 Subject: Compile fix for win32-icc. The Intel Compiler inlined the destructor of QObjectPrivate too agressively, causing it to generate a call to ~QObjectData for QtGui. ~QObjectData is not exported from QtCore, so it failed linking. Task-number: QTBUG-5145 Reviewed-by: Alexis Menard (cherry picked from commit db5e4496229a776768464d1d3d2e1f8e81bd6ba0) --- src/corelib/kernel/qobject.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 10e0307..9614e7a 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -154,6 +154,15 @@ 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); @@ -165,6 +174,9 @@ QObjectPrivate::~QObjectPrivate() delete extraData; #endif } +#ifdef Q_CC_INTEL +# pragma auto_inline(on) +#endif int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) { -- cgit v0.12