> -----Original Message-----
> [...]
> From: development-bounces+kai.koehne=digia....@qt-project.org
> These two change combined trigger QTBUG-37283: it's now not possible to
> use qCDebug(cat) on a compiler w/o variadic macros, where cat is a function
> that returns a QLoggingCategory subclass. That's because
> 
>      const QLoggingCategorySubclass &(*)()
> 
> is not a type compatible with CategoryFunction above. Perhaps the header
> can be refactored?

It's true that this is a SC breakage. It's the price we have to pay for getting 
the printf-style qCDebug version, which was a much requested feature on this 
mailing list ...

As I commented on QTBUG-37283, the SC breakage happens only if you both 
sub-class QLoggingCategory (which is IMO a misuse), and compile with e.g. 
'-ansi' (no variadic macros). Given that QLoggingCategory/qCDebug is a 
relatively new feature (introduced in 5.2) I personally consider this break to 
be acceptable.

I now created a documentation patch that explicitly mentions QLoggingCategory 
shouldn't be subclassed: https://codereview.qt-project.org/#change,83886 . 
Maybe we can also mark QLoggingCategory with C++11 'final' without breaking BC? 
Note that the destructor is already non-virtual ...

Regards

Kai
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to