Brought Okteta plugin back to life
ClosedPublic

Authored by apuzio on Jan 13 2016, 10:59 PM.

Details

Summary

The changes consist of ending porting to KF5 and porting to the new Okteta API.
Details:

  • CmakeLists fixed (new library names)
  • Includes fixed (now referencing to a okteta and kasten subdirectories is required)
  • Renamed all Kasten2 to Kasten (Kasten2 was renamed to Kasten)
  • Small changes to end porting to KF5
  • Removed code for Kasten1, old "Kasten" and removed cheching of KASTEN_VERSION define (dropped support for very old Okteta version)
  • Removed KASTEN_NAMESPACE define and oktetaglobal.h as this made it empty
  • Changed from .desktop to .json (support for .dektop files of plugins in Kdevelop was dropped)
Test Plan

Basic features seam to work.
It's hard for me to check it fully as I don't know about all of the futures.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apuzio updated this revision to Diff 1945.Jan 13 2016, 10:59 PM
apuzio retitled this revision from to Some includes and CmakeLists fixed.
apuzio updated this object.
apuzio edited the test plan for this revision. (Show Details)
apuzio added reviewers: kfunk, kossebau.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJan 13 2016, 10:59 PM
kfunk edited edge metadata.Jan 13 2016, 11:24 PM

Mostly nitpicks.

Nice work!

I'll let Friedrich do a proper review.

utils/CMakeLists.txt
7–8

Please remove this line and the indentation after.

11

This pulls in KastenCore automatically I assume? -> Then don't specifically search for it.

12

Similarly

14

Similarly

17

Remove

utils/okteta/CMakeLists.txt
16–17

Remove

29

Duplicate

utils/okteta/kdevokteta.json
2

This file should have proper indentation. Did sth go wrong with desktoptojson?

utils/okteta/oktetadocument.cpp
211–213

Fix indent

234–235

Nitpick: Use new-style connect

utils/okteta/oktetaglobal.h
0

As you said: This file should probably be killed?

utils/okteta/oktetaplugin.cpp
116

QVariant::fromValue(...)?

kossebau edited edge metadata.Jan 14 2016, 5:08 AM

Good morning :)
Looks good in general, just some comments where things could be optimized for minimal cmake config code.

Okteta just got a fix for the missing installed header, both master and Application/15.12 branches.
Did not yet try to compile KDevelop with this diff though, so cannot give feedback on it.
Please tell me if the fix commited to Okteta works for you.

utils/CMakeLists.txt
0–1

TODO note can be removed with this work :)

1

Almost all of the below can be removed.
Actually the only lib which needs to be searched for explicitely is OktetaKastenControllers.
Its config cmake dependency chain requires and imports all the others already (unless something else regressed, poke me if).
So this should be enough for this whole file (untested):

find_package( OktetaKastenControllers 0.3.1)
set_package_properties(OktetaKastenControllers PROPERTIES
        PURPOSE "Required for building Okteta KDevelop plugin."
        URL "https://kde.org/"
        TYPE OPTIONAL)

if (OktetaKastenControllers_FOUND)
    add_subdirectory(okteta)
endif()

If you want to be a little bit more explicit, you could require

find_package( OktetaGui )
find_package( KastenControllers )
find_package( OktetaKastenControllers )

to reflect the three logical groups here (OktetaCore/Gui, KastenCore/Gui/Controllers, OktetaKastenCore/Gui/Controllers). But then it does not really add value, so you could leave that out.

17

Why remove these? The subdir should be only entered to build the plugin if the optional deps are found, no?
It rather needs fixing to use the proper _FOUND vars (matching the lower/uppercasing of the package name(s)), and just if (OktetaKastenControllers_FOUND) should be enough here

utils/okteta/CMakeLists.txt
19–20

To be removed now.

25–29

Just OktetaKastenControllers should be enough. If you prefer explicit listing of all libs, the complete list is

OktetaKastenControllers
OktetaKastenGui
OktetaKastenCore
KastenControllers
KastenGui
KastenCore
OktetaGui
OktetaCore
29

Can be removed now as well, give there is no more desktop file generated and used.

utils/okteta/kastentoolviewwidget.cpp
28

If you prefer, CamelCase includes should now be possible for all classes, so e.g. here

#include <Kasten/Okteta/ByteArrayView>

and similar for all other includes.

But plain header includes like you kept using for now work of course as well. Just in case you preferred them, for consistency :)

apuzio retitled this revision from Some includes and CmakeLists fixed to Brought Okteta plugin back to life.Jan 14 2016, 10:44 AM
apuzio updated this object.
apuzio edited edge metadata.
apuzio updated this revision to Diff 1965.Jan 14 2016, 8:26 PM
  • Removed unnecesserry lines from CMakeLists.txt
  • Fixed indent in oktetadocument.cpp and new-style connect
  • Used dektoptojeson to generate kdevokteta.json
  • Cleaned the oktetaglobal.h file
  • simplified use of QVariant in oktetaplugin.cpp and removed last KASTEN_VERSION use
kfunk accepted this revision.Jan 14 2016, 8:37 PM
kfunk edited edge metadata.

Rest looks good to me. Feel free to push to 5.0.

utils/okteta/kdevokteta.json
122

Remove this line, no longer needed.

This revision is now accepted and ready to land.Jan 14 2016, 8:37 PM
apuzio updated this revision to Diff 1966.Jan 14 2016, 8:44 PM
apuzio marked 12 inline comments as done.
apuzio edited edge metadata.
  • Use new-style connect everywhere
apuzio updated this revision to Diff 1967.Jan 14 2016, 8:49 PM
apuzio marked an inline comment as done.
  • Removed oktetaglobal.h fully
apuzio marked 2 inline comments as done.Jan 14 2016, 8:49 PM
apuzio added inline comments.
utils/CMakeLists.txt
1

Turned out that find_package( KastenControllers ) is also required.

utils/okteta/CMakeLists.txt
25–29

This same here. Also KastenControllers is required. (linking errors)

utils/okteta/kastentoolviewwidget.cpp
28

I don't want to fix this. Maybe it would be prettier, but the required work is not worth it.

utils/okteta/kdevokteta.json
3

I actually used some find&replace with RegExp to generate the previous one. New one is generated with dektoptojson. (the lack of indentation was based on the link)

apuzio updated this object.Jan 14 2016, 8:51 PM
apuzio edited the test plan for this revision. (Show Details)
apuzio marked 3 inline comments as done.
apuzio marked 3 inline comments as done.Jan 14 2016, 8:52 PM
This revision was automatically updated to reflect the committed changes.