Hi, I'm looking into making the qt_add/removeObject(QObject*) hooks useful on more platforms. Having those available considerably improves the results you get in GammaRay, compared to the fallback mode that tries to find objects via global event filters and hierarchies.
The current situation is that the hooks work fine on Linux/QNX in combination with LD_PRELOAD (unless you have a non-recent gold that ignores QtCore.dynlist). They also work on Mac/Windows, with the nasty function re- writing code we have in GammaRay, but only if the compiler optimizer isn't interfering (ie. actually emits those functions, and calls them, preferably with arguments). My attempts to keep the optimizer far enough away (MSVC: __declspec(noinline), #pragma optimize("g", off), Clang: __attribute__(noinline), 'asm("")' in the body) improved things but not to the point to being usable in release builds (MSVC merges both functions with qt_startup_hook, and neither MSVC nor Clang provide the QObject* argument). So unless there's some compiler magic I missed I think this needs a different approach to be reliable and cross-platform, such as callbacks. Would this be acceptable? If so, would a minimal approach similar to qt_register_signal_spy_callbacks() or rather something using QInternal::registerCallback() be preferred? qt_startup_hook() is suffering from the same problem, but that's easier to work around by other means, and it doesn't receive arguments, so both approaches listed above would work. Any preferences on how to handle this one while we are at it? Also, for anyone from Froglogic: Would any of this be causing problems for you guys? regards, Volker -- Volker Krause | volker.kra...@kdab.com | Senior Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-independent software solutions
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development