Port KImageMapEditor away from kdelibs4support
ClosedPublic

Authored by yurchor on Oct 24 2018, 12:23 PM.

Details

Summary

Remove the last deprecated thing (Quanta+ is dead and its plugin best be on its way) and mention of kdelibs4support in CMakeLists.txt, sort headers in some files.

Test Plan
  1. Start KImageMapEditor (can be done via command line with an image file name).
  2. Add some map and save it.
  3. Check that the map works in a browser.
  4. Load the image map HTML again into the editor, check if everything is in place.

Diff Detail

Repository
R443 KImageMapEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
yurchor requested review of this revision.Oct 24 2018, 12:23 PM
yurchor created this revision.
aacid accepted this revision.Oct 25 2018, 9:19 PM
aacid added a subscriber: aacid.

Weird that we don't need the factory anymore, but ok i guess if it works :)

This revision is now accepted and ready to land.Oct 25 2018, 9:19 PM

Isn't it needed for the KPart to work? I had a work in progress branch but it's basically a complete rewrite.

So I'm not against this change; while it would be nice to have a complete port, it's probably not really important.

Isn't it needed for the KPart to work? I had a work in progress branch but it's basically a complete rewrite.

Yes, that was a bit of surprise for me too. But it works somehow.

Can someone test and confirm my conclusion that it is not needed for KImageMapEditor as a standalone application (afaik no other application can use it now as a plugin)?

This patch restores the kpart code to be "conforming to spec"

https://paste.kde.org/p9pooyklc

It doesn't really matter much since kimagemapeditor is not using kpart loading but directly instantiating the class (which is a bit weird tbh).

But as said, with this patch I could just change okularpart to kimagemapeditor in the okular shell and it loaded the kimagemapeditor part (then it didn't really show anything not sure if either because okular shell assumes to much about the part it loads or because the imagemapeditor assumes too much about it's holder).

Anyway i think we have two options:

  • Use my patch and if someone ever really wants to load kimagemapeditor as a part fix it
  • Stop shipping kimagemapeditorpart.desktop and pretending kimagemapeditor is a part we expect the outside world to use.

I'm unsure which i think it's a better plan/idea. So comment! :D

yurchor updated this revision to Diff 44280.Oct 27 2018, 6:12 AM

Save KPart for the second coming of HTML editors (thanks to Albert Astals Cid).

This revision was automatically updated to reflect the committed changes.