mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-12 12:46:24 +00:00
Added missing qmls
This commit is contained in:
parent
9a2a3f44d5
commit
22ea93a0cf
0
test/testQAbstractItemModel.qml
Normal file
0
test/testQAbstractItemModel.qml
Normal file
34
test/testQObject.qml
Normal file
34
test/testQObject.qml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import QtQuick 2.3
|
||||||
|
|
||||||
|
QtObject {
|
||||||
|
id: testCase
|
||||||
|
objectName: "testCase"
|
||||||
|
|
||||||
|
function testObjectName() {
|
||||||
|
if (!testObject)
|
||||||
|
return false;
|
||||||
|
return testObject.objectName === "testObject"
|
||||||
|
}
|
||||||
|
|
||||||
|
function testPropertyReadAndWrite() {
|
||||||
|
if (!testObject)
|
||||||
|
return false
|
||||||
|
if (testObject.name !== "foo")
|
||||||
|
return false
|
||||||
|
testObject.name = "bar"
|
||||||
|
if (testObject.name !== "bar")
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
function testSignalEmittion() {
|
||||||
|
if (!testObject)
|
||||||
|
return false
|
||||||
|
if (testObject.name !== "foo")
|
||||||
|
return false
|
||||||
|
var result = false
|
||||||
|
testObject.nameChanged.connect(function(name){ result = name === "bar" })
|
||||||
|
testObject.name = "bar"
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user