I want to make the qDebug or qWarning method to write the class and method name that calling them.Now I writing like below but It is hard work for all class and method in my application.Does Any one know How can I do this?
void File::downloadingFinishd()
{
qWarning()<<"File::downloadingFinishd()";//How write this ?without manually doing this?
qDebug()<<"Download was succceed";
}
I want something Like android because I see in output that it writing method and class name with diffrent color Just with calling qDebug()
Q_FUNC_INFOis the Qt version of std pretty function.From Qt Doc:
If you want to avoid verbosity in client code, you can define your own macro with a
Q_FUNC_INFO, for instance: