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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • 6.x
    • 6.6
    • QML: Compiler

    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

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

          Activity

            People

              sami.shalayel Sami Shalayel
              agolubev Andrei Golubev
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews