Thank you very much, I will try to accomplish this.
Hi Î ÎÏÏοÏ,
Post by Î ÎÏÏÎ¿Ï Î£Î¹Î»Î¹Î³ÎºÎ¿ÏναÏYou can see here [1] the latest changes. I am getting linker's errors
about
Post by Î ÎÏÏÎ¿Ï Î£Î¹Î»Î¹Î³ÎºÎ¿ÏναÏsome functions that are unimplemented. I ported most of the code base to
newer C++ and Qt5 but I don't know where to go from here.
Any help would be appreciated.
Nice to see you are still seeing to scratch your itch here, as started last
December (
https://frinring.wordpress.com/2017/09/08/in-pane-preview-of-qt-ui-files-with-kuiviewer-coming-up/#comment-5689
).
Sadly myself I currently have no time to really help with any
implementation,
but let me at least point you to some building and linking initial code of a
reimplementation of the qtdesigner integration plugin. Which I had started
this spring, but then did not pursue more so far as it was low priority.
The code builds and links against current KDevelop, and I pushed that now in a
https://cgit.kde.org/scratch/kossebau/kdevqtdesigner.git (web UI)
The code so far only works for registering a custom document/view handler for
Qt Designer files, and itself only can load and show files.
As you found out, the Qt Designer library still exists in Qt5, e.g. is also
consumed in Qt Creator. Sadly though the interface has changed a bit, a
library Qt5DesignerComponent has been split off which has no proper CMake
Config files yet (see also comment in src/CMakeLists.txt). That needs filing a
bug and fixing in Qt, as well as writing some workaround cmake code in the
plugin to handle that properly (I only did a simple hack that worked for
me(tm)).
IIRC the code of the old qtdesigner plugin had some broken support for the
multi-view feature of kdevelop, the implementation would only work if people
did not do split views and have multiple views on the same UI file. My
reimplementation should have also deal with that, by having some intermediae
QBuffer object in the document, to which the views should then sync their
data. That syncing part is missing also yet, only sketched in my mind. :)
Another issue with the plugin is that in KDevelop/KDevPlatform switching
between text editor view and custom editor view seems broken meanwhile and not
possible for the same file, something has regressed in kdevplatform when it
comes to that feature over what I think to remember from kdevelop4. So once
the plugin is active, one currently no longer can edit UI files as plain text,
only be the plugin.
Personally as before I would like to see more non-text editor integration in
KDevelop, but seems current maintainers have no own needs here, so not pushing
myself into that direction :) and concentrating on other features which seem
more agreed about.
Though then KDevelop is plugin-based, and perhaps we can manage to fix the
core in a way, that the qtdesigner integration plugin can be made nicely work
and still maintained externally, without getting in the way of the maintainers
who are not interested in it :)
BTW: this mailinglist "kdevelop" is for users of KDevelop rather, you might
this email there, please subscribe to that mailinglist and continue
implementation discussion there.
In any case is this a bigger challenge you chose to master here, with lots of
hurdles. So hopefully you have good energies :) As said, myself will not have
time left to help you a lot, my KDevelop TODO list is full of own interest
things. Perhaps you find some other people here who will be happy to join your
existing effort for such a qtdesigner integration plugin?
Next to the code of the old plugin, some place which might hold some ideas for
you is the Designer-based plugin for Qt Creator, you can nicely browse the
https://code.woboq.org/qt5/qt-creator/src/plugins/designer/
That might help in case more API has changed for Qt5. But this is really
challenging stuff, given some of the Designer(Component) API used is also
private and might break between minor Qt versions. Really no free lunch here.
Good luck, lots to learn, you will be a Qt expert afterwards :)
Cheers
Friedrich