brauch added a comment.

  Thanks for the feedback! I will try doing a few more things with this 
interace and then maybe discuss again with the other kate people here at 
Akademy about which one they like better.
  
  About the tracking, I don't think anything is needed on the side of the 
interface. You can see how you can potentially do it in the KDevelop patch I 
attached: create a moving cursor for the location you want the note to track, 
and then compute the note's position from the moving cursor's position as 
needed in the getter each time.
  I think this is even better than doing it in the interface itself, since it 
is more flexible with regards to how exactly the moving cursor behaves.
  
  Regarding the QVarLengthArray, performance-wise it would be better, but it 
makes the public API ugly (QVarLengthArray is a relatively internal, hacky 
class which is supposed to be only used in special cases), so I think we should 
first profile whether this is a bottleneck in any possible use case (it 
probably isn't).
  
  Currently, I'm trying out whether we can add some simple interaction ("note 
clicked") as well already, since I think that would be nice long-term. If the 
API is nice, we can fix small uglyness like the cursor navigation around notes 
at any later time IMHO.
  
  Best,
  Sven

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D14826

To: brauch, michalsrb, dhaumann, cullmann
Cc: anthonyfieroni, kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, 
ngraham, bruns, demsking, cullmann, sars, dhaumann

Reply via email to