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

Dependency cycle between QtDatavisualization and QtDatavisualizationQml

    XMLWordPrintable

Details

    • 24106d1e1c (qt/qtdatavis3d/dev) 24106d1e1c (qt/tqtc-qtdatavis3d/dev) eadd0d19b0 (qt/qtdatavis3d/6.4) eadd0d19b0 (qt/tqtc-qtdatavis3d/6.4) fbe9947bd6 (qt/qtdatavis3d/6.3) fbe9947bd6 (qt/tqtc-qtdatavis3d/6.3) 24106d1e1c (qt/qtdatavis3d/wip/NG)
    • Team B Foundation Sprint 60

    Description

      When trying an ubsan build of qtdatavis3d, I get:

      qtdatavis3d/src/datavisualization/CMakeFiles/DataVisualization.dir/engine/abstract3dcontroller.cpp.o:(.data.rel+0x5838): undefined reference to `typeinfo for AbstractDeclarative'
      

      Digging into it, I found that AbstractDeclarative is defined only in DataVisualization_Qml_, a separate library that depends on DataVisualization.

      It seemed this worked because Abstract3DController only used inline members of AbstractDeclarative, so a normal build doesn't need the class exported.

      But an UBSan build requires the type_info, which isn't available, and cannot be made available because of the layering violation.

      To fix, AbstractDeclarative needs to be moved to DataVisualization and exported (it can't, being a QQuickItem, so that, in turn, means that the class needs to be split into an interface that can live in DataVisualization and an interface/implementation that has to live in DataVisualizationQml. iow: dependency inversion.

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes