Strange Bug: Signal <-> Slot connection not working in Qt 4.4 - works in Qt 4.5
Milian Wolff
mail at milianw.de
Wed Apr 22 12:32:07 UTC 2009
Hello fellow developers!
I'm working on KDevelop and I stumbled upon a strange bug which I cannot
solve. Basically we do a connect() which returns true but at the point we have
the emit of the signal receivers() returns 0 (and the slot never gets called
of course).
This problem only seems to occur in Qt 4.4 / Kde 4.2 and not in Qt 4.5... I
already showed this problem to zwabel, adymo, apol, apaku and other KDevelop
people but they are clueless as well. Apaku could reproduce the problem on his
Qt 4.4 machine at work.
So, does anyone of you can help me? Or do you guys at least can give me a hint
on where to look? I don't actually want to start to debug QObject (not even
sure I'd be up to it). Here's a description on how to (possibly) reproduce the
problem:
compile a recent version of KDevplatform and KDevelop, start KDevelop
attach to that instance with gdb and set the following breakpoint:
break 'KDevelop::DUChain::documentLoadedPrepare(KDevelop::IDocument*)'
Open up any .cpp / .h file and see if it hits the breakpoint. For me (and apaku
on his Qt 4.4 machine) this slot is never getting called... In Qt 4.5 it
magically works.
I checked the code and could not find a cause why the signal<->slot connection
should would be released... Neither the duchain nor the document get
removed...
A bit more in-depth information:
KDevelop::DUChain::DUChain
-> connects it's documentLoadedPrepare slot to the
documentLoadedPrepare signal from KDevelop::IDocument
KDevelop::IDocument::notifyLoaded
-> emits the documentLoadedPrepare signal
NOTE: notifyLoaded is getting called! it's just that the emit in there has no
receivers...
KDevelop::TextDocument::slotDocumentLoaded
-> calls notifyLoaded on the IDocument
KDevelop::TextDocument::slotDocumentLoaded is connected in the TextDocument
ctor to the textchanged and documentloaded signals of KTextEditor::Document.
It would be great if somebody could give us a hint!
--
Milian Wolff
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090422/16b60db4/attachment.sig>
More information about the KDevelop-devel
mailing list