This is a slightly modified version of the InlineNote interface written by Michal in D12662.
- move the interface to the view instead of the document (rather trivial)
- rework how notes are queried (see below)
I'm not sure about which API is better, the old suggestion or this one. The problem I see with the old one is that you need to return pointers to instances of the notes, which you need to memory-manage yourself. This means you either allocate all of them immediately, or you need some rather complex tracking of what instances you created and when to free them again.
Effectively, I tried to implement inline error display (see attachments below) for KDevelop, once with the API from the other patch and once with this one. The amount of lines is approximately the same, but with this API, you can implement it only as a view on top of what's already there, i.e. you only add three member functions which return things based on the existing data. With the other API, you need a vector as member which contains all the notes instances and you need to manage that.
What do you think? I'd especially be interested in Michal's thoughts :)