aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2018-05-15 15:58:12 +1000
committerLorn Potter <lorn.potter@gmail.com>2018-05-15 18:41:53 +0000
commit5f4698c4e7952d64e78e3a06de5ac28d68415b19 (patch)
tree7ee371873e4206b13f1eaf60d48bb3ae9a10f8ca
parent7e22af4bfdfd736e624321924eaae0e0d36940c7 (diff)
wasm: revert DirectConnection changes
Requires the wasm qthread changes in qtbase Change-Id: Ib55b683e0f752031a596ecdafcef22b7c8b9d494 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
-rw-r--r--src/imports/layouts/qquicklayout.cpp5
-rw-r--r--src/quick/items/qquickitemview.cpp14
2 files changed, 3 insertions, 16 deletions
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
index d2bf0bbe8f..b3a5a2cfc8 100644
--- a/src/imports/layouts/qquicklayout.cpp
+++ b/src/imports/layouts/qquicklayout.cpp
@@ -781,12 +781,7 @@ void QQuickLayout::itemChange(ItemChange change, const ItemChangeData &value)
if (change == ItemChildAddedChange) {
Q_D(QQuickLayout);
QQuickItem *item = value.item;
-#ifndef QT_NO_THREAD
qmlobject_connect(item, QQuickItem, SIGNAL(baselineOffsetChanged(qreal)), this, QQuickLayout, SLOT(invalidateSenderItem()));
-#else
- // DirectConnection seems too quick for wasm here
- QObject::connect(item, SIGNAL(baselineOffsetChanged(qreal)), this, SLOT(invalidateSenderItem()));
-#endif
QQuickItemPrivate::get(item)->addItemChangeListener(this, changeTypes);
d->m_hasItemChangeListeners = true;
if (isReady())
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
index bc8163d53c..a02358e275 100644
--- a/src/quick/items/qquickitemview.cpp
+++ b/src/quick/items/qquickitemview.cpp
@@ -331,17 +331,9 @@ void QQuickItemView::setModel(const QVariant &m)
if (d->model) {
d->bufferMode = QQuickItemViewPrivate::BufferBefore | QQuickItemViewPrivate::BufferAfter;
-
- Qt::ConnectionType type = Qt::AutoConnection;
-#ifdef QT_NO_THREAD
- // This is needed because the thread affinity of the receiving object
- // will be different from the executing thread, when threads are not
- // supported
- type = Qt::DirectConnection;
-#endif
- QObject::connect(d->model, SIGNAL(createdItem(int,QObject*)), this, SLOT(createdItem(int,QObject*)), type);
- QObject::connect(d->model, SIGNAL(initItem(int,QObject*)), this, SLOT(initItem(int,QObject*)), type);
- QObject::connect(d->model, SIGNAL(destroyingItem(QObject*)), this, SLOT(destroyingItem(QObject*)), type);
+ connect(d->model, SIGNAL(createdItem(int,QObject*)), this, SLOT(createdItem(int,QObject*)));
+ connect(d->model, SIGNAL(initItem(int,QObject*)), this, SLOT(initItem(int,QObject*)));
+ connect(d->model, SIGNAL(destroyingItem(QObject*)), this, SLOT(destroyingItem(QObject*)));
if (isComponentComplete()) {
d->updateSectionCriteria();