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

qmltc cannot distinguish method(Type) from method(const Type &)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0 Feature Freeze, 6.x
    • Fix Version/s: 6.x
    • Component/s: QML: Compiler
    • Labels:

      Description

      Sometimes we have to deal with a dilemma of `void foo(Type)` vs `void foo(const Type &)`:
      a) these are different overloads of the same function
      b) they can be mixed with other overloads e.g. `void foo()`

      This problem occurs particularly in signal-slot connections as qmltc attempts to connect a signal handler to a signal via QObject::connect() using its typed interface.

      The overloads themselves can be resolved with qOverload<Ts...>() utility but that is not good enough on its own since qmltc needs to provide exact types to this function (and it currently fails to do so for `void foo(const Type &)` emitting `qOverload<Type>(&ObjType::foo)`)

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              agolubev Andrei Golubev
              Reporter:
              agolubev Andrei Golubev
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews