aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-24 17:36:04 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-24 17:36:04 +0100
commitad67ec26d0cbc98e3440dd38bb20eef4da2ee96d (patch)
tree9f8135751df2f995a4f55837ea065a4687245b71 /src/qml/types
parent83a16630c13969e68cd3a5aaab73335ccb0d4414 (diff)
parent20d160d0513a04be187ed851a25b029f47c27b27 (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
Diffstat (limited to 'src/qml/types')
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp5
-rw-r--r--src/qml/types/qqmltimer.cpp8
-rw-r--r--src/qml/types/qquickpackage.cpp2
3 files changed, 11 insertions, 4 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 9bd3b474b2..b38190336e 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -1358,6 +1358,11 @@ void QQmlDelegateModel::_q_itemsRemoved(int index, int count)
const QList<QQmlDelegateModelItem *> cache = d->m_cache;
for (int i = 0, c = cache.count(); i < c; ++i) {
QQmlDelegateModelItem *item = cache.at(i);
+ // layout change triggered by removal of a previous item might have
+ // already invalidated this item in d->m_cache and deleted it
+ if (!d->m_cache.contains(item))
+ continue;
+
if (item->modelIndex() >= index + count)
item->setModelIndex(item->modelIndex() - count);
else if (item->modelIndex() >= index)
diff --git a/src/qml/types/qqmltimer.cpp b/src/qml/types/qqmltimer.cpp
index 879970b962..fb500426f3 100644
--- a/src/qml/types/qqmltimer.cpp
+++ b/src/qml/types/qqmltimer.cpp
@@ -329,7 +329,11 @@ bool QQmlTimer::event(QEvent *e)
ticked();
return true;
} else if (e->type() == QEvent_Triggered) {
- emit triggered();
+ if (d->running && d->pause.isStopped()) {
+ d->running = false;
+ emit triggered();
+ emit runningChanged();
+ }
return true;
}
return QObject::event(e);
@@ -340,10 +344,8 @@ void QQmlTimerPrivate::animationFinished(QAbstractAnimationJob *)
Q_Q(QQmlTimer);
if (repeating || !running)
return;
- running = false;
firstTick = false;
QCoreApplication::postEvent(q, new QEvent(QEvent_Triggered));
- emit q->runningChanged();
}
QT_END_NAMESPACE
diff --git a/src/qml/types/qquickpackage.cpp b/src/qml/types/qquickpackage.cpp
index 49bab67f3d..5fe73ec0e0 100644
--- a/src/qml/types/qquickpackage.cpp
+++ b/src/qml/types/qquickpackage.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
\snippet package/Delegate.qml 0
These named items are used as the delegates by the two views who
- reference the special \l{VisualDataModel::parts} property to select
+ reference the special \l{DelegateModel::parts} property to select
a model which provides the chosen delegate.
\snippet package/view.qml 0