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

Modal QProgressDialog's setValue() does not always need to call processEvents()

    XMLWordPrintable

Details

    • dfd2dbcda509835014dd9091884bf6ae62cb83b3 (qt/tqtc-qtbase/tqtc/android_automotive-5.15)

    Description

      Currently the QProgressDialog::setValue(int) function can decide to call QApplication::processEvents() based on the results of QWidget::isModal(). However, this function returns true when a dialog anything but modeless. A progress dialog that is window modal does not need this processEvents() call to keep the application responsive. Calling processEvents() is only useful when the dialog is application modal.

      In the case that a background thread is performing an action and the progress dialog is kept window modal, this may cause a large amount of setValue() calls to be queued which in turn may cause a stack overflow, more or less the very thing you put a warning for in the documentation. Using a window modal dialog should not cause these kinds of issues, as you can normally use the application's event loop.

      Attachments

        For Gerrit Dashboard: QTBUG-10561
        # Subject Branch Project Status CR V

        Activity

          People

            vhilshei Volker Hilsheimer
            franzk Frans Klaver
            Votes:
            5 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes