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

QFutureWatcher resultsReadyAt may report rubbish

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.6, 6.0
    • 5.15
    • Core: QtConcurrent
    • None
    • All
    • 8
    • 44ceb56 7e61b18d325c5b0022eedadf9e65b1d34d6c635f (qt/tqtc-qtbase/5.15)

    Description

      In filter mode, QFutureInterface<int>::addResult(const T *, int index) reports total rubbish.
      Consider this sequence

      QFutureInterface<int> iface;
      iface.setFilterMode(true);//sic!
      ...
      iface.reportResult(&value, 0);
      iface.reportResult(&value, 1);
      iface.reportResult(&value, 2);
      iface.reportResult(&value, 3);
      

      would trigger (in an attached QFutureWatcher) resultsReadyAt(begin, end)
      with ranges:

      0, 1
      1, 3
      2, 5
      3, 7
      

      Which makes zero sense. The bug is that the end of the range when reporting ready results is too large.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            tpochep Timur Pocheptsov
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes