Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.3, 6.8.0
-
None
Description
Passing a QList<QVariant> as part of a slot Parameter between a remote object client/server, some typing error appears when QVariant are int and bool.
Here are the output of server and client with a small example project (see attachment)
Server
Content: [ Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-01-30"), indic: QList(Indicator(indicId: 0, value: QVariant(bool, true)), Indicator(indicId: 1, value: QVariant(int, 1)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-02-01"), indic: QList(Indicator(indicId: 0, value: QVariant(int, 1)), Indicator(indicId: 1, value: QVariant(bool, true)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-03-20"), indic: QList(Indicator(indicId: 0, value: QVariant(int, 1)), Indicator(indicId: 1, value: QVariant(bool, false)), Indicator(indicId: 2, value: QVariant(bool, true)), Indicator(indicId: 3, value: QVariant(int, 0)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-02-02"), indic: QList(Indicator(indicId: 0, value: QVariant(int, 0)), Indicator(indicId: 1, value: QVariant(bool, true)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-01-31"), indic: QList(Indicator(indicId: 0, value: QVariant(bool, false)), Indicator(indicId: 1, value: QVariant(int, 1)))) ]
Client
Client: [ Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-01-30"), indic: QList(Indicator(indicId: 0, value: QVariant(bool, true)), Indicator(indicId: 1, value: QVariant(bool, true)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-02-01"), indic: QList(Indicator(indicId: 0, value: QVariant(bool, true)), Indicator(indicId: 1, value: QVariant(bool, true)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-03-20"), indic: QList(Indicator(indicId: 0, value: QVariant(int, 1)), Indicator(indicId: 1, value: QVariant(bool, false)), Indicator(indicId: 2, value: QVariant(bool, true)), Indicator(indicId: 3, value: QVariant(int, 0)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-02-02"), indic: QList(Indicator(indicId: 0, value: QVariant(int, 0)), Indicator(indicId: 1, value: QVariant(bool, true)))), Exam(patient: Patient(firstName: "John", lastName: "Deer"), patientWeight: 62, date: QDate("2017-01-31"), indic: QList(Indicator(indicId: 0, value: QVariant(int, 0)), Indicator(indicId: 1, value: QVariant(bool, true)))) ]
We see here with the first 2 elemements "Exam" that Qvariant type change between the server and the client depending on the order in which variable are stored in the QList.
We also see with the 4th elements "Exam" that the typing is correct this time, i suspect its because value are really different this time (0 and 1/true, if they were both 0/false, both variants would be of type "int")). But then, the typing in the 5th elements is wrong again and seems to have kept the pattern of the previous element (int then bool instead of the expected bool then int)