Re: [Development] QML preprocessor

2019-03-19 Thread Thiago Macieira
On Tuesday, 19 March 2019 09:03:16 PDT Jason H wrote: > I don't know why you can't just use a C/C++ preprocessor to generate the > qml? For Clang, -E : Only run the preprocessor qglobal.h is assembler-safe too. -D__ASSEMBLER__ and it won't produce C or C++ code that would confuse your parser.

Re: [Development] QML preprocessor

2019-03-19 Thread Jason H
> On 18/03/19 12:11, Pierre-Yves Siret wrote: > > This can be done with QQmlFileSelector : > > > >     QQmlApplicationEngine engine; > >     QQmlFileSelector* qmlFileSelector = QQmlFileSelector::get(&engine); > > > > #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) > >     qmlFileSelector->setExtraSe

Re: [Development] QML preprocessor

2019-03-18 Thread Alberto Mardegan
On 18/03/19 12:11, Pierre-Yves Siret wrote: > This can be done with QQmlFileSelector : > >     QQmlApplicationEngine engine; >     QQmlFileSelector* qmlFileSelector = QQmlFileSelector::get(&engine); > > #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) >     qmlFileSelector->setExtraSelectors({"5.12"}

Re: [Development] QML preprocessor

2019-03-18 Thread Samuel Stirtzel via Development
Am So., 17. März 2019 um 13:35 Uhr schrieb Alberto Mardegan : > > Hi there! > When developing a QML module for the greater public one wants to > provide a source package that can be built on multiple Qt versions. > However, QML's lack of a preprocessor makes this rather cumbersome. > > Suppose th

Re: [Development] QML preprocessor

2019-03-18 Thread Pierre-Yves Siret
Hello, This can be done with QQmlFileSelector : QQmlApplicationEngine engine; QQmlFileSelector* qmlFileSelector = QQmlFileSelector::get(&engine); #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) qmlFileSelector->setExtraSelectors({"5.12"}); #endif engine.load(QUrl(QStringLiteral("qr

Re: [Development] QML preprocessor

2019-03-18 Thread Albert Astals Cid via Development
El diumenge, 17 de març de 2019, a les 13:34:09 CET, Alberto Mardegan va escriure: > Hi there! > When developing a QML module for the greater public one wants to > provide a source package that can be built on multiple Qt versions. > However, QML's lack of a preprocessor makes this rather cumber

[Development] QML preprocessor

2019-03-17 Thread Alberto Mardegan
Hi there! When developing a QML module for the greater public one wants to provide a source package that can be built on multiple Qt versions. However, QML's lack of a preprocessor makes this rather cumbersome. Suppose that my module needs to provide an element like this: import QtQuick 2.