Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-3129

Show log messages for non-@Slot decorated listeners in more cases.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.9.1
    • PySide
    • None

    Description

      When trying to work through an issue (which resulted in https://bugreports.qt.io/browse/PYSIDE-3124) I found theĀ 

      export QT_LOGGING_RULES="qt.pyside.libpyside.warning=true" 

      feature very useful. While debugging I thought of some things that could make it even more helpful (I'm not sure how feasible each of these is):

      • Report Slot decorated methods or functions that are not members of a QObject based class.
      • Report QObject classes that neglect to run super()._init_()
        • Ensure that Non-slot listeners are reported on QObject based classes even when super()._init_() is not called.
      • Report non-slot Signal listeners in general (could work as mostly a catch all for the above cases).

      Ideally the included example would emit 5 more warning than it currently does. 3 for the connecting non-slot/incorrectly setup listeners. 1 for failing to call super()._init() in the classes __init_() method. 1 for Slot decorating a non-Qbject method.

      Even just a subset of these would be useful.

      Attachments

        1. console_out.txt
          0.5 kB
          Kyle Monson
        2. listeners-3.py
          2 kB
          Kyle Monson
        3. pyside3129_diag.diff
          2 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            kmonson Kyle Monson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes