Details
-
Task
-
Resolution: Fixed
-
P2: Important
-
6.8, 6.9
-
None
-
-
8
-
351b7a31a (dev), dd54e32d9 (dev), 94465265a (dev)
-
Foundation Sprint 125, Foundation Sprint 126
Description
As pointed out in QTBUG-133553, an attempt to use the same DBus interface in multiple modules will lead to linking problems in static Qt builds, because of the duplicated symbols.
One way to solve it is to provide a custom name to the generated interface class, using -c option of qdbusxml2cpp. However, this approach would not work when the xml files are processed by the build system using the DBUS_INTERFACE_SOURCES and DBUS_INTERFACE_FLAGS properties, because the flags can only be specified to all sources.
A better approach would be to wrap all the generated C++ classes into the module-specific namespaces.
This task is about extending qdbusxml2cpp to provide a new flag (e.g. n or -namespace), which would wrap the generated class into a custom namespace.
Note: maybe -n is not the best flag, since we already have -N, that prevents the org::freedesktop::DBus::ClassName wrapper from being generated.
Attachments
Issue Links
- is required for
-
QTBUG-134305 Use new qdbusxml2cpp --namespace parameter in Qt
-
- In Review
-
- resulted from
-
QTBUG-133553 [REG: 6.8.0->6.8.1] Duplicated symbol OrgFreedesktopDBusPropertiesInterface::staticMetaObject' between QtGui and QtConnectivity
-
- Closed
-
For Gerrit Dashboard: QTBUG-133611 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
625450,10 | Add namespaces to qdbusxml2cpp | dev | qt/qtbase | Status: MERGED | +2 | 0 |
630025,2 | qdbusxml2cpp: remove stray whitespaces in the end of the line | dev | qt/qtbase | Status: MERGED | +2 | 0 |
630368,2 | qdbusxml2cpp: remove unneeded newlines in the end of the cpp files | dev | qt/qtbase | Status: MERGED | +2 | 0 |