diff options
Diffstat (limited to 'tests/auto/qml/qmltc/QmltcTests/mySignals.qml')
-rw-r--r-- | tests/auto/qml/qmltc/QmltcTests/mySignals.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltc/QmltcTests/mySignals.qml b/tests/auto/qml/qmltc/QmltcTests/mySignals.qml new file mode 100644 index 0000000000..c79a0518c2 --- /dev/null +++ b/tests/auto/qml/qmltc/QmltcTests/mySignals.qml @@ -0,0 +1,27 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QmltcTests +import QtQuick + + +TypeWithSignal { + property int primitive + property font gadget + property QtObject object + + // value types by value + onSignalWithPrimitive: (x) => { primitive = x; } + onSignalWithGadget: (x) => { gadget = x; } + + // value types by const reference + onSignalWithConstReferenceToGadget: (x) => { gadget = x; } + + // object by pointers + onSignalWithPointer: (x) => { object = x; } + onSignalWithPointerToConst: (x) => { object = x; } + onSignalWithPointerToConst2: (x) => { object = x; } + onSignalWithConstPointer: (x) => { object = x; } + onSignalWithConstPointerToConst: (x) => { object = x; } + onSignalWithConstPointerToConst2: (x) => { object = x; } +} |