[kdelibs/frameworks] tier4/kde4support/src/kdeui: Unbreak build

David Faure faure at kde.org
Fri Nov 8 08:50:15 UTC 2013


On Friday 08 November 2013 08:23:52 Aurélien Gâteau wrote:
> Git commit bb9fd7c91ccee66bbd6f4efef944e20c19a23178 by Aurélien Gâteau.
> Committed on 08/11/2013 at 08:23.
> Pushed by gateau into branch 'frameworks'.
> 
> Unbreak build
> 
> Moc was failing on the KDE4SUPPORT_DEPRECATED macro. I initially tried to
> just wrap it in a "#ifndef KDE_NO_DEPRECATED" block, but it still did
> not like it, so I removed the KDE4SUPPORT_DEPRECATED.
> 
> What is the proper way to mark a signal deprecated?

>From kdemacros.h:

 * It does not make much sense to use the KDE_DEPRECATED keyword for a Qt signal;
 * this is because usually get called by the class which they belong to,
 * and one would assume that a class author does not use deprecated methods of
 * his own class. The only exception to this are signals which are connected to
 * other signals; they get invoked from moc-generated code. In any case,
 * printing a warning message in either case is not useful.
 * For slots, it can make sense (since slots can be invoked directly) but be
 * aware that if the slots get triggered by a signal, the will get called from
 * moc code as well and thus the warnings are useless.

But Qt (moc) has a solution for us:

QT_MOC_COMPAT void mySignal();

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list