D14513: Add QML Extensions API
David Rosca
noreply at phabricator.kde.org
Fri Aug 10 20:09:14 BST 2018
drosca added inline comments.
INLINE COMMENTS
> anmolgautam wrote in qmlfileutils.cpp:27
> Entry path and root path differs because in metadata.desktop we can specify entry file as - `X-Falkon-EntryPoint=demo/main.qml`, which will point to the main.qml file within the demo directory of plugin (root-dir-of-plugin/demo/main.qml) now the extensionpath set in the QmlEngine is the entry point path. Also you told previously that the paths must be relative to root irrespective of the qml file, so I added this. For example in this case -
> FilePath & ExtensionPath is "/home/tarptaeya/.config/falkon/plugins/qml/TestPlugin/demo/main.qml"
> m_path is "/home/tarptaeya/.config/falkon/plugins/qml/TestPlugin/"
> FilePath & ExtensionPath is "/home/tarptaeya/.config/falkon/plugins/qml/TestPlugin/demo/main.qml"
This is entry point and is only needed for creating the QML component, and is never used again.
> m_path is "/home/tarptaeya/.config/falkon/plugins/qml/TestPlugin/"
Still I don't see the problem. This path is what you have stored in QmlEngine (and if you don't, you should!) and only this path is needed to resolve relative paths. That means this is "basePath" of the extension which will be used for resolving all relative paths (including what you get in X-Falkon-EntryPoint). This also means that the only path that needs to be absolute is this, everything else can be stored as relative path and resolved against it.
REPOSITORY
R875 Falkon
REVISION DETAIL
https://phabricator.kde.org/D14513
To: anmolgautam, drosca
Cc: falkon, herrold, anmolgautam, SGOrava, iodelay, spoorun, ptabis, navarromorales, cochise, clivej, ach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/falkon/attachments/20180810/e5e25798/attachment.html>
More information about the Falkon
mailing list