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

Pure virtual slots constantly being called when overridden slots marked as slots

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.11.1
    • Core: Event loop
    • None
    • Linux/X11

    Description

      How to reproduce:

      -Define slots in base class as pure virtual

      -Mark the virtual methods of base class as public slots

      -Don't connect those slots

      -emit signals from the subclass

      -the FIRST slot (defined as pure virtual) will keep getting called and any logic inside that slot will be executed.

       

      Workaround:

      -Define your slots in the subclass as public and not public slots

       

      Drawback:

      -If you need to ask for slot methods using QMetaMethod on the subclass, you won't see them, you might wanna go up the chain to get those.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            aghosn ayman ghosn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes