From 33348994de656361942456834ac0c719ff5d87b8 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 6 Jul 2016 13:55:31 +0200 Subject: Clean up qt quick controls 1 dialogs Based on code review for qqc2 integration, apply cleanup changes to qqc1. Change-Id: I9752ce944385a529a1d999a5419638868e18d799 Reviewed-by: Kai Koehne --- .../QtWebEngine/Controls1Delegates/AlertDialog.qml | 32 +++++++++++++ .../Controls1Delegates/ConfirmDialog.qml | 49 ++++++++++++++++++++ .../QtWebEngine/Controls1Delegates/FilePicker.qml | 47 +++++++++++++++++++ .../Controls1Delegates/PromptDialog.qml | 52 ++++++++++++++++++++++ .../QtWebEngine/Controls1Delegates/qmldir | 5 +++ .../QtWebEngine/UIDelegates/AlertDialog.qml | 32 ------------- .../QtWebEngine/UIDelegates/ConfirmDialog.qml | 49 -------------------- .../QtWebEngine/UIDelegates/FilePicker.qml | 47 ------------------- .../QtWebEngine/UIDelegates/PromptDialog.qml | 52 ---------------------- .../mock-delegates/QtWebEngine/UIDelegates/qmldir | 5 --- 10 files changed, 185 insertions(+), 185 deletions(-) create mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml create mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml create mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml create mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml create mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir delete mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml delete mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml delete mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml delete mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml delete mode 100644 tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir (limited to 'tests') diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml new file mode 100644 index 000000000..4ba3be4b9 --- /dev/null +++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/AlertDialog.qml @@ -0,0 +1,32 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// Both dialogs are basically expected to behave in the same way from an API point of view +ConfirmDialog +{ +} diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml new file mode 100644 index 000000000..9933fc2f7 --- /dev/null +++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/ConfirmDialog.qml @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQml 2.0 +import QtTest 1.0 +import "../../TestParams" 1.0 + +QtObject { + property string text; + property string title; + signal accepted(); + signal rejected(); + + function open() { + JSDialogParams.dialogTitle = title; + JSDialogParams.dialogMessage = text; + JSDialogParams.dialogCount++; + if (JSDialogParams.shouldAcceptDialog) + accepted() + else + rejected() + } +} + diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml new file mode 100644 index 000000000..5d78807df --- /dev/null +++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/FilePicker.qml @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.2 +import "../../TestParams" 1.0 + +QtObject { + property bool selectMultiple: false; + property bool selectExisting: false; + property bool selectFolder: false; + + signal filesSelected(var fileList); + signal rejected(); + + function open() { + FilePickerParams.filePickerOpened = true; + if (FilePickerParams.selectFiles) + filesSelected(FilePickerParams.selectedFilesUrl) + else + rejected() + } +} diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml new file mode 100644 index 000000000..7c5b16eab --- /dev/null +++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/PromptDialog.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQml 2.0 +import QtTest 1.0 +import "../../TestParams" 1.0 + +QtObject { + property string text; + property string title; + signal accepted(); + signal rejected(); + signal input(string text); + signal closing(); + + function open() { + JSDialogParams.dialogTitle = title; + JSDialogParams.dialogMessage = text; + JSDialogParams.dialogCount++; + if (JSDialogParams.shouldAcceptDialog) { + input(JSDialogParams.inputForPrompt) + accepted() + } else { + rejected() + } + } +} diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir new file mode 100644 index 000000000..cf8ac0512 --- /dev/null +++ b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/Controls1Delegates/qmldir @@ -0,0 +1,5 @@ +module QtWebEngine.UIDelegates +AlertDialog 1.0 AlertDialog.qml +ConfirmDialog 1.0 ConfirmDialog.qml +FilePicker 1.0 FilePicker.qml +PromptDialog 1.0 PromptDialog.qml diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml deleted file mode 100644 index 4ba3be4b9..000000000 --- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/AlertDialog.qml +++ /dev/null @@ -1,32 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Both dialogs are basically expected to behave in the same way from an API point of view -ConfirmDialog -{ -} diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml deleted file mode 100644 index 9933fc2f7..000000000 --- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/ConfirmDialog.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQml 2.0 -import QtTest 1.0 -import "../../TestParams" 1.0 - -QtObject { - property string text; - property string title; - signal accepted(); - signal rejected(); - - function open() { - JSDialogParams.dialogTitle = title; - JSDialogParams.dialogMessage = text; - JSDialogParams.dialogCount++; - if (JSDialogParams.shouldAcceptDialog) - accepted() - else - rejected() - } -} - diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml deleted file mode 100644 index 5d78807df..000000000 --- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/FilePicker.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.2 -import "../../TestParams" 1.0 - -QtObject { - property bool selectMultiple: false; - property bool selectExisting: false; - property bool selectFolder: false; - - signal filesSelected(var fileList); - signal rejected(); - - function open() { - FilePickerParams.filePickerOpened = true; - if (FilePickerParams.selectFiles) - filesSelected(FilePickerParams.selectedFilesUrl) - else - rejected() - } -} diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml deleted file mode 100644 index 7c5b16eab..000000000 --- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/PromptDialog.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQml 2.0 -import QtTest 1.0 -import "../../TestParams" 1.0 - -QtObject { - property string text; - property string title; - signal accepted(); - signal rejected(); - signal input(string text); - signal closing(); - - function open() { - JSDialogParams.dialogTitle = title; - JSDialogParams.dialogMessage = text; - JSDialogParams.dialogCount++; - if (JSDialogParams.shouldAcceptDialog) { - input(JSDialogParams.inputForPrompt) - accepted() - } else { - rejected() - } - } -} diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir b/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir deleted file mode 100644 index cf8ac0512..000000000 --- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/UIDelegates/qmldir +++ /dev/null @@ -1,5 +0,0 @@ -module QtWebEngine.UIDelegates -AlertDialog 1.0 AlertDialog.qml -ConfirmDialog 1.0 ConfirmDialog.qml -FilePicker 1.0 FilePicker.qml -PromptDialog 1.0 PromptDialog.qml -- cgit v1.2.3