v1.0.2 Release
Critical Changes
- The QML package name has been changed from
Future
toQuickFuture
import QuickFuture 1.0
- Type registration is done by
QuickFuture::registerType
instead ofQFFuture::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"