[QBS] qbs property namespace
Ilya Lyubimov
villytiger at gmail.com
Thu Aug 13 12:21:10 CEST 2015
Hi!
You must set the property of cmd object in prepare script.
cmd.serverPort = serverPort;
See an example here: http://doc.qt.io/qbs/commands.html#javascriptcommand
2015-08-13 12:59 GMT+03:00 Stephan Gatzka <stephan.gatzka at gmail.com>:
> Hi!
>
> I'd like to access a property defined in a Module with in a
> JavaScriptCommand return by prepare in a Rule:
>
> Module {
> property string serverPort: "12345"
> Rule {
>
> ...
>
> prepare: {
> var cmd = new JavaScriptCommand();
> cmd.sourceCode = function() {
> ...
> print("serverport: " + serverPort)
> }
> return cmd;
> }
> }
> }
>
> This module is references in a CppApplication via Depends {}
>
> qbs complains that the variable can't be found. I think I've just no clue
> about the namespaces in qbs.
>
> Maybe someone can help me out here?
>
> Thanks,
>
> Stephan
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
--
С уважением, / Best regards
Любимов Илья / Ilya Lyubimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150813/3ca2b122/attachment.html>
More information about the Qbs
mailing list