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

QMetaObject::invokeMethod alternative with compile-time checking

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • P4: Low
    • None
    • 5.7.0
    • Core: Object Model
    • None

    Description

      The QMetaObject::invokeMethod doesn't have compile-time checking for function names. There is also an overhead in specifying the member function by a string since a lookup and string matching is performed for every call.

      One solution is using the signal-slot architecture, but this enforces wrapping each caller code in a QObject class to be able to emit that signal.

      I wonder if there is anything similar to the new QObject::connect PMF syntax for invoking a method that provides compile time checking and possibly reduce the cost of invoking.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              nickaein Isaac Nickaein
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes