On quinta-feira, 3 de maio de 2012 14.53.44, Adriano Rezende wrote:
> Hi,
>
> Currently we have these 2 functions in qobject.cpp:
>
> extern "C" Q_CORE_EXPORT void qt_addObject(QObject *)
> {}
>
> extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
> {}
>
>
> The qt_addObject is being called in the QObject constructor and
> qt_removeObject in the destructor.
> It seems that they are being overloaded via ld_preload by some profiling
> tools like Squish to do some tracing. I'm also using them to trace
> QObjects lifetime in QML applications.
>
> I think this kind of tracing is interesting to have in QtCreator and
> also in some other external tools. The problem is that this approach is
> not multiplatform and we don't have any guarantee that these functions
> will not be removed by accident.

They won't be removed by accident because, at least for those, we know exactly
what they are.

> My suggestion is to replace them by callbacks and keep the setters in a
> private header. Someone is against this idea?

Not at all.

I suggested that the Squish and Gamma Ray developers get together and put
together a proper callback implementation set, which we'll gladly use in Qt 5.
I don't think that is high in their priority list, though.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to