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

Adjust loopLevel for deleteLater() calls issued in QEventDispatcher filterEvent()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.0
    • Core: Event loop
    • None
    • i686-pc-linux-gnu; linux-3.1.6, binutils-2.21.1a, gcc-4.6.2, glib-2.14.1, Qt-4.7.4 or Qt-4.8.0, KDE-4.7.4

    Description

      There exist cases where one connects the destroyed() signal to a slot in which deleteLater() calls are made or triggered. In such cases, as deleteLater() calls are not processed until the (event) loopLevel drops below the current level (which is often (always?) 1 here), the deferred deletions may not be done until the application exits. This issue is now occurring in KDE-4.7.X.

      The attached patch addresses this issue by incrementing loopLevel specifically for the
      'emit destroyed()' signal in src/corelib/kernel/qobject.cpp

      I realize this is a bit of a hack, and may not be the proper way to handle this, but
      hopefully it will spur discussion and resolution of the issue.

      Attachments

        Issue Links

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

          Activity

            People

              earthdomain Earth Domain (Inactive)
              jpsinthemix John Stanley
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes