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

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

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes