summaryrefslogtreecommitdiff
path: root/tests/auto/webchannel/tst_webchannel.h
diff options
context:
space:
mode:
authorDave Andrews <jetdog330@hotmail.com>2016-08-22 22:43:55 -0400
committerMilian Wolff <milian.wolff@kdab.com>2016-09-29 15:04:25 +0000
commit7cb2d467c3421eced44ae7b887b8738cc68595fc (patch)
tree52f26037e5963d46383b9484b30f3937755d9c3b /tests/auto/webchannel/tst_webchannel.h
parente354bdc5cbe33621def2b200f01d6376291570fc (diff)
downloadqtwebchannel-7cb2d467c3421eced44ae7b887b8738cc68595fc.tar.gz
Fix asynchronous signals from QObjects in different threads
Switches the signal listener in QWebChannel from using Qt::DirectConnection to Qt::AutoConnection to relay signals from QObjects in different affinities than the QWebChannel. Also adds a unit test in testAsyncObject() to verify that QWebChannel no longer crashes when receiving such a signal, and that such objects can be added and removed dynamically. Task-number: QTBUG-51366 Change-Id: I51a4886286fec9257a21ea95360c1ea8889a584a Reviewed-by: Dave Andrews <jetdog330@hotmail.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Diffstat (limited to 'tests/auto/webchannel/tst_webchannel.h')
-rw-r--r--tests/auto/webchannel/tst_webchannel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/webchannel/tst_webchannel.h b/tests/auto/webchannel/tst_webchannel.h
index 70a368c..94dccf5 100644
--- a/tests/auto/webchannel/tst_webchannel.h
+++ b/tests/auto/webchannel/tst_webchannel.h
@@ -123,6 +123,7 @@ signals:
void objectPropertyChanged();
void returnedObjectChanged();
void propChanged(const QString&);
+ void replay();
public slots:
void slot1() {}
@@ -141,6 +142,7 @@ public slots:
}
void setProp(const QString&prop) {emit propChanged(mProp=prop);}
+ void fire() {emit replay();}
protected slots:
void slot3() {}