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 Reviewed-on: http://codereview.qt-project.org/4960 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>bb10
parent
80d406ce39
commit
1416f4c595
|
|
@ -135,7 +135,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; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue