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

Remove QApplication::processEvents() in QFileSystemModel::setIconProvider() because it has adverse side effects

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 4.8.0
    • None
    • None
    • All Platforms (Linux, Windows, Mac)

    • c46f708c69bedda2db4549ebb857e79f304a017c

    Description

      QFileSystemModel::setIconProvider() calls QApplication::processEvents().

      Depending on the position QFileSystemModel::setIconProvider() is called, this can lead to the following adverse side effects:

      • GUI displayed in an inconsistent/partially constructed state until the next update (often)
      • Crash, if QApplication::processEvents() enters an event method of a widget that is currently beeing constructed at the position setIconProvider() is called and uses a member that has not been created yet (sometimes)

      Is there a good reason for calling processEvents() in this context? If there isn't, I suggest removing this call alltogether.

      Attachments

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

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            mdoppler Michael Doppler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes