Error matching function parameters
I work on an Qt project created in an old Qt version(4...).
I have a class where is defined signal like this:
Q_INVOKABLE void clientsDataComplete(QString serverData, QString testVar, QString test1);
Somewhere in code is emited this signal so:
emit clientsDataComplete("serverResponse", "asdasd", "test1111");
In Qml, where signal is handled, i do this:
console.log("trouble data1: " + serverData);
console.log("trouble data2: " + testVar);
console.log("trouble data3: " + test1);
And i get this logs:
qml: trouble data1: undefined
qml: trouble data2: serverResponse
qml: trouble data3: asdasd
So, i don't know if it's a bug or wrong coding.
Thanks for any help!
One thing that is out of place is the
Q_INVOKABLEmacro, Signals declaration are enough by themselves.
This can happen only if the clientsDataComplete is defined with two parameters somewhere and serverData variable is not recognised. Can show you complete class declaration ?
Apparently, it seem to be a bug.
An update from Qt 5.11.0 to Qt 5.11.1 solved that issue.