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

QFutureWatcher cancel() does not mark the QFutureWatcher as isCanceled()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.3.2
    • Core: Threads
    • None
    • Windows 7 x64, MSVC2013

    Description

      When canceling a QFuture created with QtConcurrent::run() using a QFutureWatcher->cancel(), the QFutureWatcher is not marked as isCanceled(). I am aware that QFutures created using QtConcurrent::run() can not be canceled, but the documentation of isCanceled() also states "Returns true if the asynchronous computation has been canceled with the cancel() function; otherwise returns false. Be aware that the computation may still be running even though this function returns true." essentially meaning "the internal cancel flag has been set some time before calling this function"...
      I'd expect isCanceled() to return true in such a case. Otherwise the documentation should document this otherwise.

      Attachments

        Issue Links

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

          Activity

            People

              sonakur Sona Kurazyan
              kiro Kim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes