summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-11-23 14:39:31 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-24 03:01:11 (GMT)
commit77a6bea85942cee8e1ffa526a31b75c57756a1f8 (patch)
tree05d059692139f75dbd7cfb4b4beb81a2a20357aa /src/corelib
parent762a7d37f961235cf48364760762c7457897a8f8 (diff)
downloadQt-77a6bea85942cee8e1ffa526a31b75c57756a1f8.zip
Qt-77a6bea85942cee8e1ffa526a31b75c57756a1f8.tar.gz
Qt-77a6bea85942cee8e1ffa526a31b75c57756a1f8.tar.bz2
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)
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qobject.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 1260d47..95602d9 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<QAbstractDynamicMetaObject*>(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) {