Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28741 TaskTree enhancements
  3. QTCREATORBUG-29834

TaskTree - change API with regards to done / error handlers

    XMLWordPrintable

Details

    • All
    • 09c4aad0e (master), d35d0b510 (master), 0e7ecee48 (master), 0fa16f848 (master), 6e6aa7102 (master), 34cef824b (master), b5f77f6d5 (master), dda75153f (master), 35e03499f (master), f84e3074c (master), fbe359308 (master), 37b6cb7f9 (master)

    Description

      This task addresses in details the 9th point in QTCREATORBUG-28741 master task.

      1. Get rid of 3 arg c'tors for CustomTask. Accept only 2 handlers: setup and done.
      2. The done handler may take additional "DoneWith doneWith" arg indicating whether the task has finished with success, an error, or whether it was canceled.
      3. In order to still support calling only one of done or error handler: add a CallDoneIf enum as a 3rd arg for CustomTask's c'tor:

      enum class CallDoneIf {
          SuccessOrError, // default
          Success,
          Error
      };
      

      4. Make "DoneWith doneWith" arg optional.
      5. Make "const Task &" arg optional.
      6. Overload the done handler to take only "DoneWith doneWith" arg, without "const Task &".
      7. Make it possible the done handler returns optionally the DoneResult

      { Success, Error}

      enum value in order to tweak the success bit.
      8. Do the same for group done / error handlers.
      9. Unifiy TaskTree::done / TaskTree::errorOccurred signals. Keep just done() signal with the additional "DoneWith doneWith" argument.
      10. Add tests for these changes, especially for done handler's tweaks.
      11. Update docs.

      Attachments

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

        Activity

          People

            jkobus Jarek Kobus
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: