summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml
blob: d275ca85115fcdd0f186c4def148a474dc14a5ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import Qt 4.7

WorkerScript {
    id: worker

    property variant response

    signal done()

    function testSend(value) {
        worker.sendMessage(value)
    }

    function compareLiteralResponse(expected) {
        var e = eval('(' + expected + ')')
        return worker.response == e
    }

    onMessage: {
        worker.response = messageObject
        worker.done()
    }
}