QML plugin name resolution WAS Re: Review Request 124916: also make kwindowsystem a module rather than a shared lib

Harald Sitter sitter at kde.org
Wed Aug 26 10:38:21 UTC 2015


Aloha

as we noticed in https://git.reviewboard.kde.org/r/124916/ the qml
plugin name resolution is pretty meh and desperately needs improving
[1].
Essentially QML plugins on Linux *must* be prefixed with 'lib'

e.g. libdragandrop.so

If they do not have the prefix they won't get found. This is pretty
unintuitive and ultimately lead to us collectively resorting to
marking QML plugins as SHARED libraries in cmake, even though they are
not. The problem is that cmake MODULEs do not get a prefix by default
so if we were to use MODULE qml would no longer be able to find the
binary plugins.

A quick trace suggests that QQmlImportDatabase::resolvePlugin is the
culprit here. It tries to resolve plugins using a hardcoded "lib"
prefix. What it should do is attempt to find the plugin with or
without prefix.

Any volunteers for improving this to also look for a pluginName without prefix?

[1] http://doc.qt.io/qt-5/qtqml-modules-qmldir.html

HS


More information about the Kde-frameworks-devel mailing list