[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Tracking changes to MovingCursor instances
From:       Dominik Haumann <dhaumann () kde ! org>
Date:       2013-06-19 7:17:54
Message-ID: 5720040.zVZh6DJBQN () obiwan
[Download RAW message or body]

On Tuesday, June 18, 2013 21:47:54 Kevin Funk wrote:
> Hey guys,
> 
> What's the preferred way to track changes to MovingCursor instances?
> 
> From [1] I can see that there is a MovingRangeFeedback class that notifies
> about changes to a MovingRange instance. But I don't see a
> "MovingCursorFeedback" class for getting feedback from a MovingCursor.
> What's the intention behind this. Am I missing something?
> 
> Context: I'm trying to fix a bug [2] in KDevelop. I need to be able to track
> the movement of editor marks. The code in question already uses
> MovingCursor to at least save back the position when the document is saved.
> However, I'd like to have immediate notifications in case the position of a
> MovingCursor changes.
> 
> Thanks
> 
> [1]
> http://kate-editor.org/2010/04/28/kate-internals-smart-cursors-and-smart-ra
> nges/ [2] https://bugs.kde.org/show_bug.cgi?id=310725

The short answer is: This is not supported.

Strictly speaking, it's not even supported for the MovingRanges: You are not 
notified, if a MovingRange changes. Only when the cursor or the mouse enters 
and leaves. Or when the range gets empty/invalid.

Based on this fact, you have to design your BreakpointModel such that it works 
around this missing feature.

Greetings,
Dominik
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic