aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickapplicationwindow
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qquickapplicationwindow')
-rw-r--r--tests/auto/qquickapplicationwindow/data/activeFocusControl.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/activefocusontab.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/attachedProperties.qml6
-rw-r--r--tests/auto/qquickapplicationwindow/data/basicapplicationwindow.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml8
-rw-r--r--tests/auto/qquickapplicationwindow/data/defaultFocus.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/fill.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/focusAfterPopupClosed.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/font.qml6
-rw-r--r--tests/auto/qquickapplicationwindow/data/layout.qml4
-rw-r--r--tests/auto/qquickapplicationwindow/data/locale.qml6
-rw-r--r--tests/auto/qquickapplicationwindow/data/opacity.qml61
-rw-r--r--tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp14
13 files changed, 102 insertions, 27 deletions
diff --git a/tests/auto/qquickapplicationwindow/data/activeFocusControl.qml b/tests/auto/qquickapplicationwindow/data/activeFocusControl.qml
index 743ae16d..ef694990 100644
--- a/tests/auto/qquickapplicationwindow/data/activeFocusControl.qml
+++ b/tests/auto/qquickapplicationwindow/data/activeFocusControl.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
width: 400
diff --git a/tests/auto/qquickapplicationwindow/data/activefocusontab.qml b/tests/auto/qquickapplicationwindow/data/activefocusontab.qml
index 45b3d1e3..07d783ac 100644
--- a/tests/auto/qquickapplicationwindow/data/activefocusontab.qml
+++ b/tests/auto/qquickapplicationwindow/data/activefocusontab.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
title: "Test Application Window"
diff --git a/tests/auto/qquickapplicationwindow/data/attachedProperties.qml b/tests/auto/qquickapplicationwindow/data/attachedProperties.qml
index fdb349ce..d241d995 100644
--- a/tests/auto/qquickapplicationwindow/data/attachedProperties.qml
+++ b/tests/auto/qquickapplicationwindow/data/attachedProperties.qml
@@ -48,9 +48,9 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Window 2.2
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
ApplicationWindow {
property alias childControl: childControl
diff --git a/tests/auto/qquickapplicationwindow/data/basicapplicationwindow.qml b/tests/auto/qquickapplicationwindow/data/basicapplicationwindow.qml
index a9412fd6..738022e9 100644
--- a/tests/auto/qquickapplicationwindow/data/basicapplicationwindow.qml
+++ b/tests/auto/qquickapplicationwindow/data/basicapplicationwindow.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
title: "Test Application Window"
diff --git a/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml b/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml
index d3218998..bf8f61b7 100644
--- a/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml
+++ b/tests/auto/qquickapplicationwindow/data/clearfocusondestruction.qml
@@ -48,10 +48,10 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
-import QtQuick.Layouts 1.12
-import QtGraphicalEffects 1.12
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtGraphicalEffects
ApplicationWindow {
width: 200
diff --git a/tests/auto/qquickapplicationwindow/data/defaultFocus.qml b/tests/auto/qquickapplicationwindow/data/defaultFocus.qml
index 5dff2b6c..4651c2fc 100644
--- a/tests/auto/qquickapplicationwindow/data/defaultFocus.qml
+++ b/tests/auto/qquickapplicationwindow/data/defaultFocus.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
visible: true
diff --git a/tests/auto/qquickapplicationwindow/data/fill.qml b/tests/auto/qquickapplicationwindow/data/fill.qml
index d29ed0f9..082e2409 100644
--- a/tests/auto/qquickapplicationwindow/data/fill.qml
+++ b/tests/auto/qquickapplicationwindow/data/fill.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
width: 400
diff --git a/tests/auto/qquickapplicationwindow/data/focusAfterPopupClosed.qml b/tests/auto/qquickapplicationwindow/data/focusAfterPopupClosed.qml
index 313bbb5f..ca8da3c2 100644
--- a/tests/auto/qquickapplicationwindow/data/focusAfterPopupClosed.qml
+++ b/tests/auto/qquickapplicationwindow/data/focusAfterPopupClosed.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
width: 200
diff --git a/tests/auto/qquickapplicationwindow/data/font.qml b/tests/auto/qquickapplicationwindow/data/font.qml
index 8bde4bf1..f0abbb9a 100644
--- a/tests/auto/qquickapplicationwindow/data/font.qml
+++ b/tests/auto/qquickapplicationwindow/data/font.qml
@@ -48,9 +48,9 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
-import QtQuick.Templates 2.12 as T
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Templates as T
ApplicationWindow {
objectName: "appWin"
diff --git a/tests/auto/qquickapplicationwindow/data/layout.qml b/tests/auto/qquickapplicationwindow/data/layout.qml
index dc840443..6d4f3794 100644
--- a/tests/auto/qquickapplicationwindow/data/layout.qml
+++ b/tests/auto/qquickapplicationwindow/data/layout.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ApplicationWindow {
width: 200
diff --git a/tests/auto/qquickapplicationwindow/data/locale.qml b/tests/auto/qquickapplicationwindow/data/locale.qml
index 5efb948f..243ce440 100644
--- a/tests/auto/qquickapplicationwindow/data/locale.qml
+++ b/tests/auto/qquickapplicationwindow/data/locale.qml
@@ -48,9 +48,9 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
-import QtQuick.Templates 2.12 as T
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Templates as T
ApplicationWindow {
objectName: "appWin"
diff --git a/tests/auto/qquickapplicationwindow/data/opacity.qml b/tests/auto/qquickapplicationwindow/data/opacity.qml
new file mode 100644
index 00000000..d3272522
--- /dev/null
+++ b/tests/auto/qquickapplicationwindow/data/opacity.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ title: "Test Application Window"
+ width: 300
+ height: 300
+ opacity: 0.5
+
+ property bool testActive: active
+}
diff --git a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
index baaa3503..347c955e 100644
--- a/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
+++ b/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
@@ -78,6 +78,7 @@ private slots:
void clearFocusOnDestruction();
void layout();
void componentComplete();
+ void opacity();
};
void tst_QQuickApplicationWindow::qmlCreation()
@@ -871,6 +872,19 @@ void tst_QQuickApplicationWindow::componentComplete()
QVERIFY(qmlWindow->isComponentComplete());
}
+void tst_QQuickApplicationWindow::opacity()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.loadUrl(testFileUrl("opacity.qml"));
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY2(!object.isNull(), qPrintable(component.errorString()));
+
+ QQuickApplicationWindow *window = qobject_cast<QQuickApplicationWindow *>(object.data());
+ QVERIFY(window);
+}
+
QTEST_MAIN(tst_QQuickApplicationWindow)
#include "tst_qquickapplicationwindow.moc"