Details
-
Bug
-
Resolution: Invalid
-
P5: Not important
-
None
-
5.9.1
-
None
-
* Fedora 26 64 bit
Description
When the XML file contains a methods or properties, called similar to the cpp keywords, e.g. like "Class", then the qdbusxml2cpp generates a files which contains a variable names like "class", that confusing the cpp compiler.
For example, the input XML file contains following:
<property name="Class" type="u" access="read"></property>
then the generated output header will be contains following:
Q_PROPERTY(uint Class READ class) inline uint class() const { return qvariant_cast< uint >(property("Class")); }
as you can see, there are two keywords "class". So, resulting property need to change something like to:
Q_PROPERTY(uint Class READ classProperty) inline uint classProperty() const { return qvariant_cast< uint >(property("Class")); }
Otherwise it is impossible to use the qmake's features like: DBUS_INTERFACES and DBUS_ADAPTORS.
Attachments
For Gerrit Dashboard: QTBUG-64758 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
212579,1 | qdbusxml2cpp: Allow to add 'get' prefix for generated properties | 5.9 | qt/qtbase | Status: ABANDONED | -1 | 0 |