Re: [Development] Q_OBJECT and override

2015-06-08 Thread Olivier Goffart
On Sunday 7. June 2015 21:04:51 Sergio Martins wrote: On Thursday, June 04, 2015 16:01:01 Aleix Pol wrote: Is it really that much work? I hear there's tools to do so [1] and it's the compiler telling whether it's correct or not. Aleix I've added Q_DECL_OVERRIDE to some kdepim

Re: [Development] Q_OBJECT and override

2015-06-07 Thread Sergio Martins
On Thursday, June 04, 2015 16:01:01 Aleix Pol wrote: Is it really that much work? I hear there's tools to do so [1] and it's the compiler telling whether it's correct or not. Aleix I've added Q_DECL_OVERRIDE to some kdepim libraries with clang-modernize and 5 minutes of my time. I also

Re: [Development] Q_OBJECT and override

2015-06-05 Thread Thiago Macieira
On Thursday 04 June 2015 17:02:52 Christian Kandeler wrote: On 06/04/2015 04:52 PM, Konstantin Ritt wrote: #define Q_OBJECT \ public: \ Q_OBJECT_CHECK \ QT_WARNING_PUSH \ Q_OBJECT_NO_OVERRIDE_WARNING \ static const QMetaObject

Re: [Development] Q_OBJECT and override

2015-06-04 Thread Aleix Pol
On Thu, Jun 4, 2015 at 2:41 PM, Bornemann Joerg joerg.bornem...@theqtcompany.com wrote: 1) Add override (or rather Q_DECL_OVERRIDE) to the definition of Q_OBJECT *and* all QObject-derived classes in Qt. [...] 2) Remove override from all QObject-derived classes in Qt. [...] 3) Explicitly

Re: [Development] Q_OBJECT and override

2015-06-04 Thread Christian Kandeler
On 06/04/2015 04:52 PM, Konstantin Ritt wrote: #define Q_OBJECT \ public: \ Q_OBJECT_CHECK \ QT_WARNING_PUSH \ Q_OBJECT_NO_OVERRIDE_WARNING \ static const QMetaObject staticMetaObject; \ virtual const QMetaObject *metaObject() const; \

Re: [Development] Q_OBJECT and override

2015-06-04 Thread Oswald Buddenhagen
On Thu, Jun 04, 2015 at 12:41:23PM +, Bornemann Joerg wrote: 1) Add override (or rather Q_DECL_OVERRIDE) to the definition of Q_OBJECT *and* all QObject-derived classes in Qt. [...] 2) Remove override from all QObject-derived classes in Qt. [...] 3) Explicitly disable the warning in

Re: [Development] Q_OBJECT and override

2015-06-04 Thread Matthew Woehlke
On 2015-06-04 08:12, Christian Kandeler wrote: as anyone who uses clang has probably already noticed, this compiler has recently added -Winconsistent-missing-override to the collection of flags enabled via -Wall. What happens if you (push state and) disable the warning at the start of the

Re: [Development] Q_OBJECT and override

2015-06-04 Thread Konstantin Ritt
#define Q_OBJECT \ public: \ Q_OBJECT_CHECK \ QT_WARNING_PUSH \ Q_OBJECT_NO_OVERRIDE_WARNING \ static const QMetaObject staticMetaObject; \ virtual const QMetaObject *metaObject() const; \ virtual void *qt_metacast(const char *); \ virtual int

[Development] Q_OBJECT and override

2015-06-04 Thread Christian Kandeler
Hi, as anyone who uses clang has probably already noticed, this compiler has recently added -Winconsistent-missing-override to the collection of flags enabled via -Wall. As a result, you now get literally thousands of warnings when building any non-trivial Qt project. This is because the

Re: [Development] Q_OBJECT and override

2015-06-04 Thread Bornemann Joerg
1) Add override (or rather Q_DECL_OVERRIDE) to the definition of Q_OBJECT *and* all QObject-derived classes in Qt. [...] 2) Remove override from all QObject-derived classes in Qt. [...] 3) Explicitly disable the warning in the clang mkspecs. [...] 4) Let users deal with the problem by making