D14513: Add QML Extensions API

David Rosca noreply at phabricator.kde.org
Sun Aug 12 07:15:59 BST 2018


drosca added inline comments.

INLINE COMMENTS

> anmolgautam wrote in qmli18n.cpp:26
> This can be similar to qsTr in Qt source, something like - 
> engine->globalObject().setProperty("i18n", engine->evaluate("function(string) { return i18n.i18n(string) }"));
> Here i18n is the context property (QObject corresponding to QmlI18n).
> But It has problems -
> 
> 1. i18n as contextProperty object
> 2. It must be added to the engine at time of its creation i.e. remove singleton of i18n from QmlPlugins and move i18n to engine global object when the engine is created in QmlPluginLoader.
> 
> Should I change I18n so that i18n adds to global namespace or leave it now? Or is there some better solution

> i18n as contextProperty object

Is that an issue?

> It must be added to the engine at time of its creation i.e. remove singleton of i18n from QmlPlugins and move i18n to engine global object when the engine is created in QmlPluginLoader.

I don't see any problem with this.

If it works, please do it this way.

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/20180812/18bcfbed/attachment.html>


More information about the Falkon mailing list