Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133611

qdbusxml2cpp: add support for custom namespaces

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.10.0 FF
    • 6.8, 6.9
    • Core: Other, D-Bus
    • None
    • Linux/X11
    • 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

          For Gerrit Dashboard: QTBUG-133611
          # Subject Branch Project Status CR V

          Activity

            People

              matthias_rauter Matthias Rauter
              ivan.solovev Ivan Solovev
              Vladimir Minenko Vladimir Minenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes