Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
5.13.1
-
49e2046ef031b35fa7cb38e53cdaee36d3a2831e (qt/qtivi/5.13) 945017497c8dd87c0a81abd15de46ba65eee62ed (qt/qtivi/5.13) 12aa8a72522e187267c5d9ce654656fbc3e96e18 (qt/qtinterfaceframework/dev) 6c362279235eab5941fb13c45610c514db8895b4 (qt/qtinterfaceframework/dev)
Description
Building a structure containing a single value is possible and works in normal cases:
struct TestStruct {
string myString;
}
interface MainService {
TestStruct thatStruct;
}
When simulating, a default value for this struct has to be specified:
com.test.main.MainService#thatStruct: config_simulator: default: ["Hello Qt"]
This results in generated code mainservicebackend.cpp for the simulator with the snippet:
, m_thatStruct(TestStruct({QLatin1String("Hello Qt")}))
unfortunately, this gets a compiler error: it's an ambiguous constructor call for the TestStruct type. It could be a copy constructor, a QVariant constructor, or a QString constructor.
Attachments
For Gerrit Dashboard: AUTOSUITE-1340 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
283049,2 | ivigenerator: Use QStringLiterals for string default_values | 5.13 | qt/qtivi | Status: MERGED | +2 | 0 |