From e42b2e8d4922a5942839850d0b031fcb19521545 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 17 Oct 2017 14:34:48 +0200 Subject: Fix outdated BSD license header in tests to use GPL-EXCEPT Change-Id: I64a7b7cb7fa6c5fe53019ed42b19989a0f8a0da2 Reviewed-by: Jani Heikkinen --- tests/auto/qml/ecmascripttests/test262.py | 46 ++++++++++++------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/tests/auto/qml/ecmascripttests/test262.py b/tests/auto/qml/ecmascripttests/test262.py index 9f0a7c1dee..437cd1b27d 100755 --- a/tests/auto/qml/ecmascripttests/test262.py +++ b/tests/auto/qml/ecmascripttests/test262.py @@ -1,39 +1,27 @@ #!/usr/bin/env python ############################################################################# ## -## Copyright (C) 2015 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite module of the Qt Toolkit. ## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: +## $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. ## -## "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." +## 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$ ## -- cgit v1.2.3 From dadaa47844f36ba2e598a1d44cfff0cb16384510 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 28 Sep 2017 09:50:48 +0200 Subject: skip part of tst_qquickwindow::testWindowVisibilityOrder on Unity It's flaky: on the CI machines, the first three windows are shown stacked on top of each other, and none of them has focus, because the terminal which is running the tests continues to have focus. If this happened to a user, he would just click in whichever window he wants to have focus. (Good thing it's visible, at least.) So this looks like broken window manager behavior. Ubuntu will switch to Gnome soon anyway; then maybe the behavior will be different. Task-number: QTBUG-62604 Change-Id: Id0db8a61e8335e7f591a38e07c488c055b236239 Reviewed-by: Frederik Gladhorn --- tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index da1373e11b..d358383ecb 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -1887,10 +1887,15 @@ void tst_qquickwindow::testWindowVisibilityOrder() QWindowList windows = QGuiApplication::topLevelWindows(); QTRY_COMPARE(windows.size(), 5); - QCOMPARE(window3, QGuiApplication::focusWindow()); - QVERIFY(window1->isActive()); - QVERIFY(window2->isActive()); - QVERIFY(window3->isActive()); + if (qgetenv("XDG_CURRENT_DESKTOP") == "Unity" && QGuiApplication::focusWindow() != window3) { + qDebug() << "Unity (flaky QTBUG-62604): expected window3 to have focus; actual focusWindow:" + << QGuiApplication::focusWindow(); + } else { + QCOMPARE(window3, QGuiApplication::focusWindow()); + QVERIFY(window1->isActive()); + QVERIFY(window2->isActive()); + QVERIFY(window3->isActive()); + } //Test if window4 is shown 2 seconds after the application startup //with window4 visible window5 (transient child) should also become visible -- cgit v1.2.3 From ec00272f749972c49d4eaf858a57c38a5bf30c8b Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 17 Oct 2017 13:04:47 +0200 Subject: QQuickAnimatorProxyJob: Disconnect from window when unsetting it Otherwise we may get called back when the window's scene graph is ready, but we don't have a controller anymore then. This leads to a crash. Change-Id: I8075619e1fd3c69ca0f7d0b1d72952b8cc5040f8 Reviewed-by: Mitch Curtis Reviewed-by: J-P Nurmi Reviewed-by: Shawn Rutledge --- src/quick/util/qquickanimatorjob.cpp | 6 +++++- .../quick/qquickanimations/tst_qquickanimations.cpp | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index 3ac02cd259..50fb7090d1 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -197,8 +197,12 @@ void QQuickAnimatorProxyJob::windowChanged(QQuickWindow *window) void QQuickAnimatorProxyJob::setWindow(QQuickWindow *window) { if (!window) { - if (m_job && m_controller) + if (m_job && m_controller) { + disconnect(m_controller->window(), &QQuickWindow::sceneGraphInitialized, + this, &QQuickAnimatorProxyJob::sceneGraphInitialized); m_controller->cancel(m_job); + } + m_controller = nullptr; stop(); diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp index fbd6c9c97e..4a7a77416a 100644 --- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp +++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,7 @@ private slots: void defaultPropertyWarning(); void pathSvgAnimation(); void pathLineUnspecifiedXYBug(); + void unsetAnimatorProxyJobWindow(); }; #define QTIMED_COMPARE(lhs, rhs) do { \ @@ -1567,6 +1569,22 @@ void tst_qquickanimations::pathLineUnspecifiedXYBug() QCOMPARE(redRect->y(), qreal(0)); } +void tst_qquickanimations::unsetAnimatorProxyJobWindow() +{ + QQuickWindow window; + QQuickItem item(window.contentItem()); + QQuickAbstractAnimation animation(&item); + QAbstractAnimationJob *job = new QAbstractAnimationJob; + QQuickAnimatorProxyJob proxy(job, &animation); + QQuickItem dummy; + item.setParentItem(&dummy); + QSignalSpy spy(&window, SIGNAL(sceneGraphInitialized())); + window.show(); + if (spy.count() < 1) + spy.wait(); + QCOMPARE(proxy.job().data(), job); +} + QTEST_MAIN(tst_qquickanimations) #include "tst_qquickanimations.moc" -- cgit v1.2.3 From d77339875a853266cd043ae9f184a776aa7d2a6d Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 21 Sep 2017 13:20:36 +0200 Subject: Return "qnx" for Qt.platform.os when appropriate [ChangeLog][QtQml] Qt.platform.os returns "qnx" when running on QNX platforms. Task-number: QTBUG-52515 Change-Id: Ie46f235248f7832fff12906cf858e8527e8060b1 Reviewed-by: Edward Welbourne Reviewed-by: J-P Nurmi --- src/qml/qml/qqmlengine.cpp | 1 + src/qml/qml/qqmlplatform.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 5a52224208..5efebe28a2 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -445,6 +445,7 @@ The following functions are also on the Qt object. \li \c "tvos" - tvOS \li \c "linux" - Linux \li \c "osx" - \macos + \li \c "qnx" - QNX (since Qt 5.9.3) \li \c "unix" - Other Unix-based OS \li \c "windows" - Windows \li \c "winrt" - WinRT / UWP diff --git a/src/qml/qml/qqmlplatform.cpp b/src/qml/qml/qqmlplatform.cpp index 165cde5eb3..0d6ab36066 100644 --- a/src/qml/qml/qqmlplatform.cpp +++ b/src/qml/qml/qqmlplatform.cpp @@ -71,6 +71,8 @@ QString QQmlPlatform::os() return QStringLiteral("windows"); #elif defined(Q_OS_LINUX) return QStringLiteral("linux"); +#elif defined(Q_OS_QNX) + return QStringLiteral("qnx"); #elif defined(Q_OS_UNIX) return QStringLiteral("unix"); #else -- cgit v1.2.3 From 2416b9d6cc2950395151c18a7f7bfceb4b7fc693 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 23 Oct 2017 18:58:18 -0500 Subject: Minor documentation improvements for Matrix4x4 Change-Id: I5340dfb214de63ad848b2c9c322c89a19b770fc2 Reviewed-by: Laszlo Agocs --- src/quick/items/qquickitem.cpp | 1 + src/quick/items/qquicktranslate.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 730506cb88..3571feb2cc 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -121,6 +121,7 @@ void debugFocusTree(QQuickItem *item, QQuickItem *scope = 0, int depth = 1) \li \l Rotation \li \l Scale \li \l Translate + \li \l Matrix4x4 \endlist The Transform types let you create and control advanced transformations that can be configured diff --git a/src/quick/items/qquicktranslate.cpp b/src/quick/items/qquicktranslate.cpp index 9937c692a5..1c8dd02b92 100644 --- a/src/quick/items/qquicktranslate.cpp +++ b/src/quick/items/qquicktranslate.cpp @@ -467,6 +467,7 @@ public: \instantiates QQuickMatrix4x4 \inqmlmodule QtQuick \ingroup qtquick-visual-transforms + \since 5.3 \brief Provides a way to apply a 4x4 tranformation matrix to an \l Item The Matrix4x4 type provides a way to apply a transformation to an -- cgit v1.2.3