[Interest] Logging meta call events
alexander golks
alex at golks.de
Wed Feb 18 07:59:09 CET 2015
Am Tue, 17 Feb 2015 23:48:54 +0000
schrieb Richard Moore <rich at kde.org>:
> On 17 February 2015 at 23:41, Bernhard <private at bernhard-lindner.de> wrote:
>
> > > > This would not allow me to integrate the findings into my custom state
> > > > engine log (which also contains transitions and a lot more things in
> > > > chronological order).
> > >
> > > The hook itself would. See qsignalspy.cpp for how to install it.
> > >
> > > Your callbacks need to be thread-safe.
> >
> > So you are not talking about the public, documented QSignalsSpy API, right?
> > Is that hook what QSignalSpy uses internally?
> >
> > I will look into this tomorrow. For the moment I could not find a
> > qsignalspy.cpp in the Qt sources.
> >
>
> http://code.woboq.org/qt5/qtbase/src/testlib/qsignalspy.h.html
>
> Rich.
if you really want to log, why not just include the private header and do the logging?
we do it in our derived q(core)application::notify, when catching exceptions during notify:
#include <../../src/qtbase/src/corelib/kernel/qobject_p.h>
//...
QMetaCallEvent* metaCallEvent=dynamic_cast<QMetaCallEvent*>(event);
if(metaCallEvent)
{
eventInfo+="\nmetacall event";
eventInfo+="\nevent id: "+QString::number(metaCallEvent->id());
eventInfo+="\nevent sender: "+getObjectInfo(metaCallEvent->sender());
eventInfo+="\nevent: "+QString::number(metaCallEvent->signalId());
}
--
/*
* /* Am I fucking pedantic or what? *\/
* linux-2.2.16/drivers/scsi/qlogicpti.h
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150218/95c9272b/attachment.sig>
More information about the Interest
mailing list