Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25256

QtCreator clazy integration; signal recognition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 4.14.0
    • None
    • macOS, Windows

    Description

      SUMMARY
      When connecting to QAbstractItemView::entered signal, clazy doesn't recognize it as a signal.

      STEPS TO REPRODUCE
      1. Subclass a QTreeWidget
      2. In the constructor, connect to the ::entered signal using something like this:
           connect(this, &QTreeWidget::entered, this, []{});
                //or//
           connect(this, &QAbstractItemView::entered, this, []{});

           (it doesn't have to be a lambda for the slot)
      3. Run clazy within QtCreator

      OBSERVED RESULT
      Clazy warns that the ::entered signal is not a signal

      EXPECTED RESULT
      Clazy recognizes the ::entered signal as a signal and no warning is given

       

      ADDITIONAL INFO

      I get the same "...is not a signal [clazy-connect-non-signal]" warning when connecting to all of these signals that are inherited from QAbstractItemView
      connect(this, &QTreeWidget::entered, this, []{});
      connect(this, &QTreeWidget::pressed, this, []{});
      connect(this, &QTreeWidget::viewportEntered, this, []{});
      connect(this, &QTreeWidget::activated, this, []{});
      connect(this, &QTreeWidget::clicked, this, []{});

      as well as from these signals inherited from QTreeView:
      connect(this, &QTreeWidget::collapsed, this, []{});
      connect(this, &QTreeWidget::expanded, this, []{});

      but NOT from any of these signals inherited from QTreeWidget:
      connect(this, &QTreeWidget::itemEntered, this, []{});
      connect(this, &QTreeWidget::itemExpanded, this, []{});
      connect(this, &QTreeWidget::itemPressed, this, []{});
      connect(this, &QTreeWidget::currentItemChanged, this, []{});
      connect(this, &QTreeWidget::itemSelectionChanged, this, []{});

      Attachments

        1. clazybugtest.zip
          3 kB
          Joshua Hertz

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              joshertz Joshua Hertz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes