diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-09 16:25:58 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-05-10 11:53:47 +0200 |
commit | 66646dd8c37adb488a79ab274b2396a649674e6d (patch) | |
tree | b0f5ac752a52cec3de1d47692e09295197622dcd /tests/auto/quick/qquickitem2/data | |
parent | da15ea0f3b5805db657f13060c21efa78f10cde2 (diff) | |
parent | d82a17b929dd88fe76258b0f801beaa1b2ee343e (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
.qmake.conf
src/plugins/accessible/quick/quick.pro
src/quick/items/qquickpincharea.cpp
src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
src/quick/scenegraph/qsgthreadedrenderloop.cpp
Manually adjusted for TestHTTPServer constructor change:
tests/auto/quick/qquickimage/tst_qquickimage.cpp
Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
Diffstat (limited to 'tests/auto/quick/qquickitem2/data')
-rw-r--r-- | tests/auto/quick/qquickitem2/data/activeFocusOnTab9.qml | 50 | ||||
-rw-r--r-- | tests/auto/quick/qquickitem2/data/keysforward.qml | 84 |
2 files changed, 134 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/activeFocusOnTab9.qml b/tests/auto/quick/qquickitem2/data/activeFocusOnTab9.qml new file mode 100644 index 0000000000..09bb73639a --- /dev/null +++ b/tests/auto/quick/qquickitem2/data/activeFocusOnTab9.qml @@ -0,0 +1,50 @@ +import QtQuick 2.1 + +Item { + id: main + objectName: "main" + width: 300 + height: 300 + TextInput { + id: textinput1 + objectName: "textinput1" + width: 300 + height: 75 + activeFocusOnTab: true + text: "Text Input 1" + anchors.top: parent.top + anchors.left: parent.left + } + TextInput { + id: textinput2 + objectName: "textinput2" + width: 300 + height: 75 + activeFocusOnTab: true + text: "Text Input 2" + readOnly: true + anchors.top: textinput1.bottom + anchors.left: parent.left + } + TextEdit { + id: textedit1 + objectName: "textedit1" + width: 300 + height: 75 + activeFocusOnTab: true + text: "Text Edit 1" + anchors.top: textinput2.bottom + anchors.left: parent.left + } + TextEdit { + id: textedit2 + objectName: "textedit2" + width: 300 + height: 75 + activeFocusOnTab: true + text: "Text Edit 2" + readOnly: true + anchors.top: textedit1.bottom + anchors.left: parent.left + } +} diff --git a/tests/auto/quick/qquickitem2/data/keysforward.qml b/tests/auto/quick/qquickitem2/data/keysforward.qml new file mode 100644 index 0000000000..f0cb4d9508 --- /dev/null +++ b/tests/auto/quick/qquickitem2/data/keysforward.qml @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + + property alias source: source + property alias primaryTarget: primaryTarget + property alias secondaryTarget: secondaryTarget + + property var pressedKeys: [] + property var releasedKeys: [] + Keys.onPressed: { var keys = pressedKeys; keys.push(event.key); pressedKeys = keys } + Keys.onReleased: { var keys = releasedKeys; keys.push(event.key); releasedKeys = keys } + + Item { + id: primaryTarget + objectName: "primary" + property var pressedKeys: [] + property var releasedKeys: [] + Keys.forwardTo: secondaryTarget + Keys.onPressed: { event.accepted = event.key === Qt.Key_P; var keys = pressedKeys; keys.push(event.key); pressedKeys = keys } + Keys.onReleased: { event.accepted = event.key === Qt.Key_P; var keys = releasedKeys; keys.push(event.key); releasedKeys = keys } + + Item { + id: source + objectName: "source" + property var pressedKeys: [] + property var releasedKeys: [] + Keys.forwardTo: primaryTarget + Keys.onPressed: { var keys = pressedKeys; keys.push(event.key); pressedKeys = keys } + Keys.onReleased: { var keys = releasedKeys; keys.push(event.key); releasedKeys = keys } + } + } + + Item { + id: secondaryTarget + objectName: "secondary" + property var pressedKeys: [] + property var releasedKeys: [] + Keys.onPressed: { event.accepted = event.key === Qt.Key_S; var keys = pressedKeys; keys.push(event.key); pressedKeys = keys } + Keys.onReleased: { event.accepted = event.key === Qt.Key_S; var keys = releasedKeys; keys.push(event.key); releasedKeys = keys } + } +} |