summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@gmx.de>2011-09-15 09:29:34 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-22 06:15:38 (GMT)
commit1aa516ccf3db45d66a7f29595c4a057e144858ec (patch)
tree1f611fbe3d938d44a8d2c3f5c53399d855865c1b /src/corelib
parent648c470a89124778b6377ff6690215df5d3793ba (diff)
downloadQt-1aa516ccf3db45d66a7f29595c4a057e144858ec.zip
Qt-1aa516ccf3db45d66a7f29595c4a057e144858ec.tar.gz
Qt-1aa516ccf3db45d66a7f29595c4a057e144858ec.tar.bz2
Fix warning when building objects with a Q_OBJECT macro
Do not trigger a self-assign warning when running into code containing a Q_OBJECT macro. Currently this happens a lot e.g. when using clang to build code using Qt. Change-Id: I68995624b18406f337318599e463f36f87486e66 (cherry-picked from qtbase commit 1416f4c595d6078c08f93483695e0b64c7fbb2a7) Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qobjectdefs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index 84f8a87..2df29f2 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -138,7 +138,7 @@ class QString;
/* tmake ignore Q_OBJECT */
#define Q_OBJECT_CHECK \
template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const \
- { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; }
+ { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i + 1; }
template <typename T>
inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; }