[Qbs] Qt Quick Tests and custom import paths

Federico Frenguelli synasius at gmail.com
Wed May 16 18:01:40 CEST 2018


> If functions were properly supported as properties, there'd be a simple
> generic solution:
>
> AutotestRunner {
>     additionalArgsFunc: function(testArtifact)  {
>         var myArgs = [];
>         var additionalImportPaths =
> testArtifact.quickpaths.additionalImportPaths;
>         for (var i in additionalImportPaths)
>              myArgs.push("-import", additionalImportPaths[i]);
>         return myArgs;
>     })
> }
>
> In fact, I think this is already possible, though the implementation (on
> the AutotestRunner side) would look rather awful, involving eval().
> So maybe that's the way to go? Higher-level concepts might not be flexible
> enough. For instance, the approach sketched above also allows you to get
> the necessary information from product or project properties, or even from
> the environment.
>

 That could be a clear and flexible solution but is it possible to use
function properties? Or you were thinking of wrapping the function
definition in a string??



-- 
Federico Frenguelli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20180516/d4eab7af/attachment.html>


More information about the Qbs mailing list