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

qt_add_dbus_adaptor behaves different than qt6_add_dbus_adaptor

    XMLWordPrintable

Details

    • fa9f13f1300cf843aa80786cf4eb217b36aef279 (qt/qtbase/dev) 2bcf3912fc0fee9d7e71fe3e1addde16c0117f70 (qt/qtbase/6.2)

    Description

      Using the unversioned command instead of the versioned qt6_add_dbus_adaptor doesn't work as expected given the following call:

      set_source_files_properties(instrumentcluster.xml PROPERTIES INCLUDE "")
      set(cluster_SRCS)
      qt_add_dbus_adaptor(cluster_SRCS
          instrumentcluster.xml
          dbus_conversion.h
          "" # empty parent_class value on purpose to not pass -l flag
          instrumentcluster_adaptor
      )
      

      As stated in the comment the parent_class argument is empty on purpose to not pass any additional -I flag.
      When using the unversioned command the empty argument is not forwarded correctly to the versioned function and the "instrumentcluster_adaptor" is interpreted as parent_class instead.

      Using -trace --trace-expand showed the following

      /home/gagi/work/qtas/qtinterfaceframework/examples/interfaceframework/qface-tutorial/chapter6-own-backend/demo_server/CMakeLists.txt(20):  qt_add_dbus_adaptor(cluster_SRCS instrumentcluster.xml dbus_conversion.h  instrumentc
      luster_adaptor )
      /home/gagi/Qt/6.2.0/gcc_64/lib/cmake/Qt6DBus/Qt6DBusMacros.cmake(205):  if(QT_DEFAULT_MAJOR_VERSION EQUAL 5 )
      /home/gagi/Qt/6.2.0/gcc_64/lib/cmake/Qt6DBus/Qt6DBusMacros.cmake(207):  elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6 )
      /home/gagi/Qt/6.2.0/gcc_64/lib/cmake/Qt6DBus/Qt6DBusMacros.cmake(208):  qt6_add_dbus_adaptor(cluster_SRCS;instrumentcluster.xml;dbus_conversion.h;;instrumentcluster_adaptor )
      /home/gagi/Qt/6.2.0/gcc_64/lib/cmake/Qt6DBus/Qt6DBusMacros.cmake(157):  get_filename_component(_infile instrumentcluster.xml ABSOLUTE )
      /home/gagi/Qt/6.2.0/gcc_64/lib/cmake/Qt6DBus/Qt6DBusMacros.cmake(159):  set(_optionalParentClass instrumentcluster_adaptor )
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crscott Craig Scott
            gagi Dominik Holland
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes