diff --git a/libqt5-qtdeclarative.changes b/libqt5-qtdeclarative.changes index a42db16..58f2118 100644 --- a/libqt5-qtdeclarative.changes +++ b/libqt5-qtdeclarative.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 26 09:50:22 UTC 2020 - Callum Farmer + +- Update to version 5.15.0: + * No changelog available + * Added qtdeclarative-5.15.0-FixMaxXMaxYExtent.patch: fixes QTBUG-83890 + ------------------------------------------------------------------- Wed May 20 16:14:29 UTC 2020 - Callum Farmer diff --git a/libqt5-qtdeclarative.spec b/libqt5-qtdeclarative.spec index 8e07b65..94b32b1 100644 --- a/libqt5-qtdeclarative.spec +++ b/libqt5-qtdeclarative.spec @@ -1,7 +1,7 @@ # # spec file for package libqt5-qtdeclarative # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,17 +19,17 @@ %define qt5_snapshot 0 %define libname libQtQuick5 %define base_name libqt5 -%define real_version 5.15.0-rc2 +%define real_version 5.15.0 %define so_version 5.15.0 -%define tar_version qtdeclarative-everywhere-src-5.15.0-rc2 +%define tar_version qtdeclarative-everywhere-src-5.15.0 Name: libqt5-qtdeclarative -Version: 5.15.0~rc2 +Version: 5.15.0 Release: 0 Summary: Qt 5 Declarative Library License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) Group: Development/Libraries/X11 URL: https://www.qt.io -Source: https://download.qt.io/development_releases/qt/5.15/%{real_version}/submodules/%{tar_version}.tar.xz +Source: https://download.qt.io/official_releases/qt/5.15/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf # PATCH-FIX-UPSTREAM https://codereview.qt-project.org/c/qt/qtdeclarative/+/299258/1 Patch1: fix-subpixel-positioned-text.patch @@ -37,6 +37,7 @@ Patch1: fix-subpixel-positioned-text.patch Patch100: sse2_nojit.patch # PATCH-FIX-OPENSUSE Switch to use python3 at build time Patch102: qtdeclarative-switch-to-python3.patch +Patch103: qtdeclarative-5.15.0-FixMaxXMaxYExtent.patch BuildRequires: fdupes BuildRequires: libQt5Core-private-headers-devel >= %{version} BuildRequires: libQt5Gui-private-headers-devel >= %{version} diff --git a/qtdeclarative-5.15.0-FixMaxXMaxYExtent.patch b/qtdeclarative-5.15.0-FixMaxXMaxYExtent.patch new file mode 100644 index 0000000..7d8e743 --- /dev/null +++ b/qtdeclarative-5.15.0-FixMaxXMaxYExtent.patch @@ -0,0 +1,336 @@ +Parent: f5a4e984 (QQuickTextInputPrivate: refactor getImplicitWidth() to calculateImplicitWidth()) +Author: David Redondo +AuthorDate: 2020-05-13 11:04:23 +0200 +Commit: Mitch Curtis +CommitDate: 2020-05-25 10:58:35 +0200 + +QQuickItemView: Fix max(X/Y)Extent() + +QQuickFlickable maxXExtent() and maxYExtent() return the amount of space +that is not shown when inside a ScrollView. QQuickItemView however just +returned width() if vertical and height() if horizontal. In these cases +just defer to the QQuickFlickable base implementation like minXExtent() +and minYExtent() already do. + +This change also adds tst_qquicklistview2 to speed up development. +tst_QQuickListView is almost 9000 lines long, and compiling it +is slow. In addition, a similar approach (creating a second test to +avoid the slowness of a massive one) already exists for QQuickItem +tests. + +Fixes: QTBUG-83890 +Pick-to: 5.15 +Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb +======================================================================================================================== +--- a/src/quick/items/qquickitemview.cpp ++++ b/src/quick/items/qquickitemview.cpp +@@ -1393,7 +1393,7 @@ + { + Q_D(const QQuickItemView); + if (d->layoutOrientation() == Qt::Horizontal) +- return height(); ++ return QQuickFlickable::maxYExtent(); + + if (d->vData.maxExtentDirty) { + d->maxExtent = d->maxExtentForAxis(d->vData, false); +@@ -1421,7 +1421,7 @@ + { + Q_D(const QQuickItemView); + if (d->layoutOrientation() == Qt::Vertical) +- return width(); ++ return QQuickFlickable::maxXExtent(); + + if (d->hData.maxExtentDirty) { + d->maxExtent = d->maxExtentForAxis(d->hData, true); + +--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp ++++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +@@ -73,6 +73,8 @@ + tst_QQuickListView(); + + private slots: ++ // WARNING: please add new tests to tst_qquicklistview2; this file is too slow to work with. ++ + void init(); + void cleanupTestCase(); + // Test QAbstractItemModel model types +@@ -297,6 +299,8 @@ + + void requiredObjectListModel(); + ++ // WARNING: please add new tests to tst_qquicklistview2; this file is too slow to work with. ++ + private: + template void items(const QUrl &source); + template void changed(const QUrl &source); +@@ -10042,6 +10046,8 @@ + } + } + ++// WARNING: please add new tests to tst_qquicklistview2; this file is too slow to work with. ++ + QTEST_MAIN(tst_QQuickListView) + + #include "tst_qquicklistview.moc" + +--- a/tests/auto/quick/qquicklistview2/data/maxXExtent.qml ++++ b/tests/auto/quick/qquicklistview2/data/maxXExtent.qml +@@ -0,0 +1,54 @@ ++/**************************************************************************** ++** ++** 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: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.15 ++ ++Item { ++ property alias view: view ++ ++ ListView { ++ id: view ++ model: 10 ++ width: 200 ++ height: 200 ++ ++ Rectangle { ++ anchors.fill: parent ++ color: "transparent" ++ border.color: "darkorange" ++ } ++ ++ delegate: Rectangle { ++ width: 100 ++ height: 100 ++ Text { ++ text: modelData ++ } ++ } ++ } ++} + +--- a/tests/auto/quick/qquicklistview2/data/maxYExtent.qml ++++ b/tests/auto/quick/qquicklistview2/data/maxYExtent.qml +@@ -0,0 +1,55 @@ ++/**************************************************************************** ++** ++** 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: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.15 ++ ++Item { ++ property alias view: view ++ ++ ListView { ++ id: view ++ model: 10 ++ width: 200 ++ height: 200 ++ orientation: ListView.Horizontal ++ ++ Rectangle { ++ anchors.fill: parent ++ color: "transparent" ++ border.color: "darkorange" ++ } ++ ++ delegate: Rectangle { ++ width: 100 ++ height: 100 ++ Text { ++ text: modelData ++ } ++ } ++ } ++} + +--- a/tests/auto/quick/qquicklistview2/qquicklistview2.pro ++++ b/tests/auto/quick/qquicklistview2/qquicklistview2.pro +@@ -0,0 +1,12 @@ ++CONFIG += testcase ++TARGET = tst_qquicklistview2 ++macos:CONFIG -= app_bundle ++ ++SOURCES += tst_qquicklistview2.cpp ++ ++include (../../shared/util.pri) ++include (../shared/util.pri) ++ ++TESTDATA = data/* ++ ++QT += core-private gui-private qml-private quick-private testlib qmltest + +--- a/tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp ++++ b/tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp +@@ -0,0 +1,114 @@ ++/**************************************************************************** ++** ++** 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: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$ ++** ++****************************************************************************/ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "../../shared/util.h" ++#include "../shared/viewtestutil.h" ++ ++using namespace QQuickViewTestUtil; ++ ++class tst_QQuickListView2 : public QQmlDataTest ++{ ++ Q_OBJECT ++ ++public: ++ tst_QQuickListView2(); ++ ++private slots: ++ void maxExtent_data(); ++ void maxExtent(); ++}; ++ ++tst_QQuickListView2::tst_QQuickListView2() ++{ ++} ++ ++class FriendlyItemView : public QQuickItemView ++{ ++ friend class ItemViewAccessor; ++}; ++ ++class ItemViewAccessor ++{ ++public: ++ ItemViewAccessor(QQuickItemView *itemView) : ++ mItemView(reinterpret_cast(itemView)) ++ { ++ } ++ ++ qreal maxXExtent() const ++ { ++ return mItemView->maxXExtent(); ++ } ++ ++ qreal maxYExtent() const ++ { ++ return mItemView->maxYExtent(); ++ } ++ ++private: ++ FriendlyItemView *mItemView = nullptr; ++}; ++ ++void tst_QQuickListView2::maxExtent_data() ++{ ++ QTest::addColumn("qmlFilePath"); ++ ++ QTest::addRow("maxXExtent") << "maxXExtent.qml"; ++ QTest::addRow("maxYExtent") << "maxYExtent.qml"; ++} ++ ++void tst_QQuickListView2::maxExtent() ++{ ++ QFETCH(QString, qmlFilePath); ++ ++ QScopedPointer window(createView()); ++ QVERIFY(window); ++ window->setSource(testFileUrl(qmlFilePath)); ++ QVERIFY2(window->status() == QQuickView::Ready, qPrintable(QDebug::toString(window->errors()))); ++ window->resize(640, 480); ++ window->show(); ++ QVERIFY(QTest::qWaitForWindowExposed(window.data())); ++ ++ QQuickListView *view = window->rootObject()->property("view").value(); ++ QVERIFY(view); ++ ItemViewAccessor viewAccessor(view); ++ if (view->orientation() == QQuickListView::Vertical) ++ QCOMPARE(viewAccessor.maxXExtent(), 0); ++ else if (view->orientation() == QQuickListView::Horizontal) ++ QCOMPARE(viewAccessor.maxYExtent(), 0); ++} ++ ++QTEST_MAIN(tst_QQuickListView2) ++ ++#include "tst_qquicklistview2.moc" + +--- a/tests/auto/quick/quick.pro ++++ b/tests/auto/quick/quick.pro +@@ -65,6 +65,7 @@ + qquickitem2 \ + qquickitemlayer \ + qquicklistview \ ++ qquicklistview2 \ + qquicktableview \ + qquickloader \ + qquickmousearea \ diff --git a/qtdeclarative-everywhere-src-5.15.0-rc2.tar.xz b/qtdeclarative-everywhere-src-5.15.0-rc2.tar.xz deleted file mode 100644 index ad8502a..0000000 --- a/qtdeclarative-everywhere-src-5.15.0-rc2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6dd0e36cbc98f43f12b55749fb6ef0310c66ed7d885d1c08f40967eb9614fb7c -size 21493748 diff --git a/qtdeclarative-everywhere-src-5.15.0.tar.xz b/qtdeclarative-everywhere-src-5.15.0.tar.xz new file mode 100644 index 0000000..eda446e --- /dev/null +++ b/qtdeclarative-everywhere-src-5.15.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c3c93fb7d340b2f7d738d12408c047318c78973cb45bfc5ff6b3a57e1fef699 +size 21493268