DUContext::range()

Ramon Zarazua rzarazua at digipen.edu
Mon Jun 29 18:11:04 UTC 2009


On Sunday 28 June 2009 07:16:01 am David Nolden wrote:
> Am Sonntag 28 Juni 2009 05:10:53 schrieb Ramon Zarazua:
> > Well I have been having a problem where sometimes a call to
> > DUContext::range() through DUContext::findContextIncluding() will return
> > an empty range. from what David told me it is usually for contexts that
> > are not open on the editor, but I am testing it always with open
> > documents on the editor. To my knowledge this is a bug, or maybe there is
> > another way to accessincluding context from an editor range?
>
> Well no it is not normal to be empty. It is normal for the top-context
> range not to have the exact size of the document though.
>
> The only contexts that have empty ranges are usally those that were
> expanded by a preprocessor macro, since they cannot have a valid range in
> the document.
>
> If you don't want "findContextIncluding(Range)" to return you such empty
> ranges, then you should call it non-empty ranges, as only empty ranges can
> be contained by an empty range.
>
> Greetings, David

Then this seems to be a Bug, because I have tried it with different documents, 
and sometimes on the TopDUContext the range is 0, and sometimes it is not. I 
have yet to find the common denominator. It is possible that it might be due 
to a local change, but I doubt it, since I have not changed any code related 
to text ranges.

--
Ramon Zarazua
Bachelor of Science in Real Time Interactive Simulation
at
Digipen Institute of technology
-------------- 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/20090629/a23dfccd/attachment.sig>


More information about the KDevelop-devel mailing list