On Tue, 15 May 2018 15:19:49 +0200
Federico Frenguelli <[email protected]> wrote:

> I'm writing a test for a qt quick component and I need to add "qrc:/qml" to
> the qml import paths.
> One way would be to add custom arguments to the AutotestRunner:
> 
> AutotestRunner {
>     arguments: ["-import", "qrc:/qml"]
> }
> 
> but then tests fail when I mix cpp tests with qt quick tests. 

Yes, the arguments property is rather inflexible in that is applied to all 
tests.

> Do you know of any workaround to make this work?

I'm not a QtQuick expert, but can't you just use the QML2_IMPORT_PATH variable?

AutotestRunner {
    environment: base.concat("QML2_IMPORT_PATH=qrc:/qml")
}


Christian
_______________________________________________
Qbs mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to