Skip to content

v1.0.2 Release

Compare
Choose a tag to compare
@benlau benlau released this 20 Apr 05:47
· 40 commits to master since this release

Critical Changes

  1. The QML package name has been changed from Future to QuickFuture
import QuickFuture 1.0
  1. Type registration is done by QuickFuture::registerType instead of QFFuture::registerType
#include <QuickFuture>
Q_DECLARE_METATYPE(QFuture<CustomType>)

...

int main(int argc, char *argv[])
{

...
   QuickFuture::registerType<CustomType>();
...

}

New API

Future.isRunning(future)

Future.isCanceled(future)

Future.onCanceled(future, callback)

Future.result(future)

Future.sync(future, propertyAtFuture, target, propertyAtTarget)

Synchronize a property in future object to target object.

Example:


QtObject {
    id: target1
    property var isRunning
    property var isFinished
}

// Future.sync(future,"isRunning", target1, "isRunning");
// Future.sync(future,"isFinished", target1);

Supported properties: "isRunning", "isCanceled", "isFinished"