aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-05-19 13:04:54 +0200
committerLiang Qi <liang.qi@qt.io>2016-05-19 20:41:34 +0200
commit63ec33e79cf86c4312c58bea12a2aab400890c70 (patch)
tree5c9b5cd51276ea0a3ca42567666a09e70efa11cc /src/quick/items
parentb9e4a4df577959579b2322fb6077bde82d9ffce3 (diff)
parentafc84775efdc6e13e2e210bb94e115b378d90134 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickflickable.cpp8
-rw-r--r--src/quick/items/qquickloader.cpp4
-rw-r--r--src/quick/items/qquickloader_p_p.h1
3 files changed, 8 insertions, 5 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index ae138d7ceb..1853a1d948 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1402,15 +1402,15 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
break;
case Qt::NoScrollPhase: // default phase with an ordinary wheel mouse
case Qt::ScrollUpdate:
- if (d->scrollingPhase) {
+ if (d->scrollingPhase)
d->pressed = true;
- d->movementEndingTimer.start(MovementEndingTimerInterval, this);
- }
+#ifdef Q_OS_OSX
+ d->movementEndingTimer.start(MovementEndingTimerInterval, this);
+#endif
break;
case Qt::ScrollEnd:
d->pressed = false;
d->scrollingPhase = false;
- d->movementEndingTimer.start(MovementEndingTimerInterval, this);
d->draggingEnding();
event->accept();
returnToBounds();
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp
index c1126d9b12..63c9558d7a 100644
--- a/src/quick/items/qquickloader.cpp
+++ b/src/quick/items/qquickloader.cpp
@@ -583,6 +583,7 @@ void QQuickLoader::setSource(QQmlV4Function *args)
d->disposeInitialPropertyValues();
d->initialPropertyValues.set(args->v4engine(), ipv);
}
+ d->qmlCallingContext.set(scope.engine, scope.engine->qmlContext());
setSource(sourceUrl, false); // already cleared and set ipv above.
}
@@ -651,7 +652,8 @@ void QQuickLoaderPrivate::setInitialState(QObject *obj)
Q_ASSERT(v4);
QV4::Scope scope(v4);
QV4::ScopedValue ipv(scope, initialPropertyValues.value());
- d->initializeObjectWithInitialProperties(ipv, obj);
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, qmlCallingContext.value());
+ d->initializeObjectWithInitialProperties(qmlContext, ipv, obj);
}
void QQuickLoaderIncubator::statusChanged(Status status)
diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h
index ad05bb00ec..9ef89a74d6 100644
--- a/src/quick/items/qquickloader_p_p.h
+++ b/src/quick/items/qquickloader_p_p.h
@@ -108,6 +108,7 @@ public:
QQmlContext *itemContext;
QQuickLoaderIncubator *incubator;
QV4::PersistentValue initialPropertyValues;
+ QV4::PersistentValue qmlCallingContext;
bool updatingSize: 1;
bool active : 1;
bool loadingFromSource : 1;