lundi 20 avril 2015

Embedded double quotes work in QT 4.7.4 not in 4.8.6

I have a Qt 4.7.4 app working. I am trying to update to Qt 4.8.6 however version 4.8.6 doesn't handle embedded double quotes like 4.7.4 has.

As an example the following string is one of twelve that we use as arguments to the QApplication:

QString myData = 
    QString("{\"type\":\"IndexFlt\",\"media\":\"1\",\"entityid\":\"0:0:0\"}");

In version 4.7.4 the twelve strings passed to QApplication as part of argv.

When I get the arguments back via theApp.arguments() in version 4.7.4 I get back all arguments with no change in formatting.

However when I pass the same argumetns to version 4.8.6 and then call theApp.arguments() the QStringList has only six entries instead of twelve.

When I look at the 6th string I see that QT took arguments 7-12 and added them to first six.

What I see in the debugger for the QStringList of arguments is different between 4.7.4 and 4.8.6. in 4.7.4

I see argument 6 as:

{"type":"IndexFlt","media":"1","entityid":"0:0:0"}

But with version 4.8.6 I see argument 6 as:

{\type":"IndexFlt","media":"1","entityid":"0:0:0"} --ScriptArg:...

As you can see instead of a double quote infront of the string type I get a / and the closing } does not get a " after it got arguments 7-12 added to argument 6.

Any ideas on how to fix this? The only thing that changed in the application is the version of Qt.

Aucun commentaire:

Enregistrer un commentaire