Restore scripting functionalities and Qt bindings.
Needs ReviewPublic

Authored by nicolamori on Oct 21 2019, 6:27 AM.
This revision needs review, but there are no reviewers specified.



Restore the loading of Qt bindings and import bindings into the Amarok code base.
The bindings files are added unmodified as extracted from the Qcad 3.23.0 codebase.
All the generated cpp files available from Qcad are added but only those
marked for complation in the original .pri file are actually built.
Place the plugin library in the build tree under bin/qtbindings/.

This is an initial RFC, development is still incomplete.


  • lots of warning during compilation, mainly override suggestions

Still missing:

  • installation
  • license check

Diff Detail

R181 Amarok
No Linters Available
No Unit Test Coverage
Build Status
Buildable 21442
Build 21460: arc lint + arc unit
nicolamori created this revision.Oct 21 2019, 6:27 AM
Restricted Application added subscribers: amarok-devel, Amarok. · View Herald TranscriptOct 21 2019, 6:27 AM
nicolamori requested review of this revision.Oct 21 2019, 6:27 AM

Nice! I don't want to discourage you, but while QtScript is still there it has been deprecated. Perhaps this still makes sense as a intermediate step, but at some point this should be ported to the QJS* classes from Qt5Qml (e.g. like done for kio

Hi Heiko, I know that QtScript is EOL but I don't have the knowledge nor spare time to do more than this ATM. I never contributed to Amarok nor any other KDE project, and also my experience with Qt is limited to some simple GUI. Nevertheless, I hope that this work migth be useful for more experienced programmers who wishes to introduce QJSEngine in Amarok, or for me to really start contributing. For the time being, I'd like to receive comments about how to proceed and what's to be changed/fixed.

nicolamori updated this revision to Diff 74024.Tue, Jan 21, 4:02 PM
  • scripting: add installation rule for qt script bindings plugin libraries.
  • scripting: add readme file with credits to QCAD project.

I just uploaded a new revision with installation rules for the bindings shared libraries. I also checked the QCAD license: they release the code under GPLv3 with no exceptions (as far as I understood) for the bindings code, so I guess there's no licensing issue in using the bindings in Amarok.
I tested the code with a simple script (BurnPlaylist) which works with minor tweaks to the script itself. However, some scripts are missing some Amarok components that have been removed, e.g. UltimateLyrics gives a warning([WARNING] [ScriptItem] Script has no script engine attached: "UltimateLyrics") and does not work, I think because LyricsManager has been removed.
I'd say then that the work on restoring the Qt bindings is done, and now it has to be decided whether to go on (which means restoring the removed scripting functionalities, something I cannot do) or stop here and drop these modifications.