implement text hint interface for automatic hover
ClosedPublic

Authored by cullmann on Jul 20 2019, 8:07 PM.

Details

Summary

instead of manual invocation, re-use the text hint interface for auto-hover invocation
do manual hover the same way, just trigger the new functionality

it is a bit hacky, as the text hint interface isn't really made for async stuff,
but it works well ;=)

Diff Detail

Repository
R40 Kate
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cullmann created this revision.Jul 20 2019, 8:07 PM
Restricted Application added a project: Kate. · View Herald TranscriptJul 20 2019, 8:07 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Jul 20 2019, 8:07 PM

:=) More nice features.

Ah, other question: Would it be ok to do the code stuff under MIT license?
That way, perhaps we can later split out some library things for 3rdparty projects (not that I think it is very likely).
Or would that be some issue?

mnauwelaerts accepted this revision.Jul 21 2019, 7:35 AM

Looks nice indeed!

I had also been considering another (more liberal) license and MIT is fine by me (not sure whether anyone else needs to agree with re-licensing at this stage ...?)

This revision is now accepted and ready to land.Jul 21 2019, 7:35 AM
dhaumann accepted this revision.Jul 21 2019, 10:22 AM

KDevelop does the same: they always return an empty QString to cancel the texthint stuff and then show their own just like you do now.

They have some more sophisticated tooltip that may be of interest in case the tooltip is not nice/good enough over time.

brauch added a subscriber: brauch.Jul 21 2019, 10:41 AM

They have some more sophisticated tooltip that may be of interest in case the tooltip is not nice/good enough over time.

The KDevelop tooltip is nice and I think copying features from it might be very cool, but I think I wouldn't copy the implementation ;)

Ok, given this feature seems to be appreciated and the implementation ok, I will merge this.
I will change the license header of the new files to MIT, there is no non-MIT code inside, given me and Mark are the only authors.
For re-licensing the other parts:

  1. for all stuff you have done from scratch, just change the license, you can copy the header of these two new files (and perhaps change the author to just you)
  2. I will ask Olivier if he is ok, too, for his patches
  3. for the remaining files: I see some have copyright of other Kate/plugin authors, did you copy stuf over from other files? If stuff remains, we would need to revisit that. before touching there license headers.
This revision was automatically updated to reflect the committed changes.

For some of the other files, I copied over some "boilerplate" to get going, so nothing unique in there and (almost surely) already modified by now into other ways and forms ...

Then feel free to cleanup the copyright of all your files, now is the time when we still know who really contributed where.
Later this will no longer work.
See the copyright headers in the hover stuff, MIT with a proper SPDX identifier for license tooling.