DUChain::chainsForDocument

Esben Mose Hansen kde at mosehansen.dk
Fri Aug 15 13:39:43 UTC 2008


Hi,

In my small test plugin, if I do 

    IDocument* doc = core()->documentController()->activeDocument();
    DUChainReadLocker lock(DUChain::lock());
    TopDUContext* topDuContext = DUChain::self()->chainsForDocument( 
doc->url() )[1];

At least one file behaves as it should, with lots of child context. However, 
if I use the more correct(?) 

TopDUContext* topDuContext = KDevelop::DUChain::self()->chainForDocument( 
doc->url() );

I get a topDuContext* that has no child ducontexts at all (though the range 
seems correct). What is the differences between these ducontexts, and how do 
I fetch the correct one?


-- 
kind regards, Esben




More information about the KDevelop-devel mailing list