Support Request #14042
closedQuotation marks lost in launch()
Description
Supportanfrage
In ADTF 3.11 there seems to be a bug regarding escaping of quotation marks in the launch() method in QML scripts used for custom filter editor context
menu entries.
It's not possible to escape quotation marks inside the command line arguments anymore. In the previously tested version ADTF 3.8, it was possible to escape a quotation mark with a backslash, e.g. \"
We have these quotation marks, as we transport the filter configuration as JSON formatted string to our application. For example:
launch('myprogram.exe' '-params "{\"filename\":\"myfile.adtfdat\"}"');
But in ADTF 3.11 the command line arguments reach myprogram.exe as
-params
and
{\filename\:\myfile.adtfdat\}
that is the escaped quotation marks in the second argument are completely lost leaving only backslashes. Thus JSON parsing fails in our application. We want to avoid that a have to change the way how we transport the data via the command line.
Since the escaping was working previously, is this a bug that can be fixed?
Is there another way to escape quotation marks for the "launch()" method?
Lösung
We opened a bug issue within the product:- [ACORE-11019] - Launch within QML Filter Editor does not escape anymore
This will be fixed in upcoming version (3.12.1 or 3.13.0)
For a workaround, you can use
modelmanager.Launch(QString strQPath, QString strQArguments, QString strQWorkspace, bool bModal = tTrue)
In short, you only need the prefix "modelmanager.".