diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-11-23 14:39:31 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-11-24 03:19:41 (GMT) |
commit | 53d57395349345c8e7e24ff2be13503f5704c592 (patch) | |
tree | 217130166f54ef9d08655fe33c0ed61381eb245b | |
parent | c27e9337b127d8946844f448892de0da31bbe8f3 (diff) | |
download | Qt-53d57395349345c8e7e24ff2be13503f5704c592.zip Qt-53d57395349345c8e7e24ff2be13503f5704c592.tar.gz Qt-53d57395349345c8e7e24ff2be13503f5704c592.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)
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<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) { |