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

Details

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

    Description

      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?

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes