[Interest] qmldir Internal Singleton File

Furkan Üzümcü furkanuzumcu at gmail.com
Fri May 3 23:51:51 CEST 2019


Hi Richard.

I tried it without the version numbers as well, and I get the same error.

Thanks for pointing to the code. I've been meaning to get my hands dirty, this seems like a great opportunity for it.
I appreciate the help.

Regards,
Furkan Üzümcü
On May 3, 2019, 17:42 -0400, Richard Weickelt <richard at weickelt.de>, wrote:
> Furkan,
>
> > In the documentation for qmldir, there’s an option to make a QML document
> > internal to the module it’s defined in with the /internal/ keyword. But when
> > I use it like so
> >
> > /Internal singleton MySingleton.qml 1.0 MySingleton.qml/
> > /
> > /
> > I get the following error:
> >
> > > /invalid qmldir directive contains too many tokens./
> > /
> > /
> > Is this not supported or am I using it wrong?
>
> The parser is implemented in
> https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qml/qmldirparser/qqmldirparser.cpp?h=dev
>
>
> I would say that this is not possible at the moment. You can try to add this
> to the parser, it should be very simple. If you are lucky, the resolveType()
> functions in qqmlimport.cpp already handle internal composite singletons
> correctly. I have taken a look at it and am quite optimistic that this is
> the case. If not, you will have to fight your way through these functions in
> qqmlimport.cpp.
>
> Note that the "internal" keyword belongs into directory listing qmldir files
> (those without version numbers), while the singleton keyword is only
> documented for module qmldir files (those with version numbers). However,
> singleton works in both variants, which is not documented. Maybe worth a bug
> report as well.
>
> This is not a qualified answer ;-)
>
> Best regards
> Richard
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190503/153c05eb/attachment.html>


More information about the Interest mailing list