diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-03-05 11:39:24 +1000 |
---|---|---|
committer | Matthew Vogt <matthew.vogt@nokia.com> | 2012-03-05 11:39:54 +1000 |
commit | 0284817d6cd7e17afa8da26ee6e9199100754446 (patch) | |
tree | c351d55d5a606c81c72e481f846b9b9e2603c883 /src/qml/qml/qqmlincubator.cpp | |
parent | 377eb94eb19dafeca20d12bc6b624f1779fae514 (diff) | |
parent | 36bd7f616f37f5f60e59bce1f0d8970248d627de (diff) |
Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
Diffstat (limited to 'src/qml/qml/qqmlincubator.cpp')
-rw-r--r-- | src/qml/qml/qqmlincubator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index ee622ba048..834d4bbb97 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -376,17 +376,18 @@ void QQmlIncubationController::incubateFor(int msecs) /*! Incubate objects while the bool pointed to by \a flag is true, or until there are no -more objects to incubate. +more objects to incubate, or up to msecs if msecs is not zero. Generally this method is used in conjunction with a thread or a UNIX signal that sets the bool pointed to by \a flag to false when it wants incubation to be interrupted. */ -void QQmlIncubationController::incubateWhile(bool *flag) +void QQmlIncubationController::incubateWhile(volatile bool *flag, int msecs) { if (!d || d->incubatorCount == 0) return; - QQmlVME::Interrupt i(flag); + QQmlVME::Interrupt i(flag, msecs * 1000000); + i.reset(); do { QQmlIncubatorPrivate *p = (QQmlIncubatorPrivate*)d->incubatorList.first(); p->incubate(i); |