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

disconnecting a signal that hasn't been connected throws exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.7.0
    • 5.14.2, 6.6.1
    • PySide
    • None
    • d7aa15abe (dev), 6b5e4bc3b (dev)

      This is, perhaps, the intended behavior, but I find it quite confusing, and also inconsistent with the underlying Qt C++ function.

      If you call disconnect() to disconnect a signal from a function, but they have never been previously connected, a runtime exception is thrown with the message "Failed to disconnect signal".  My main issue is that this message is confusing and misleading, since it doesn't really seem like a "failure" to me - it's just that there's nothing to do.

      I also find it inconsistent that the C++ disconnect function returns false on failure, and you can simply ignore that, if you wish.  Why doesn't the PySide2 function return false rather than throwing an exception?

        For Gerrit Dashboard: PYSIDE-1275
        # Subject Branch Project Status CR V

            kleint Friedemann Kleint
            jeffyost2 Jeffery Yost
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes