From 652085c5c2f843b1345e741352b4e2e8328f13fe Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 30 Jul 2019 12:47:33 +0200 Subject: [PATCH 1/5] qfsfileengine_p.h: Un-inline processOpenModeFlags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An inlined exported function does not make sense and will cause a warning. Fixes: QTBUG-77242 Change-Id: I016b93d6b39c4db82148fdc5a8a92bc9d5751885 Reviewed-by: Jörg Bornemann --- src/corelib/io/qfsfileengine_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h index 5231b4fe6f9..22109ac5bc0 100644 --- a/src/corelib/io/qfsfileengine_p.h +++ b/src/corelib/io/qfsfileengine_p.h @@ -66,7 +66,7 @@ struct ProcessOpenModeResult { QIODevice::OpenMode openMode; QString error; }; -inline Q_CORE_EXPORT ProcessOpenModeResult processOpenModeFlags(QIODevice::OpenMode mode); +Q_CORE_EXPORT ProcessOpenModeResult processOpenModeFlags(QIODevice::OpenMode mode); class QFSFileEnginePrivate; From 305f2c3aa6a2405f8fdeaa33f5d8c684e425f4ee Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Tue, 30 Jul 2019 14:01:56 +0300 Subject: [PATCH 2/5] BLACKLIST insert_remove_loop for msvc-2019 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-77239 Change-Id: Ie1a08db0b4c4e1bbcb7981f24bcf12d5e6d33e48 Reviewed-by: Tony Sarajärvi --- tests/auto/corelib/tools/collections/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/corelib/tools/collections/BLACKLIST diff --git a/tests/auto/corelib/tools/collections/BLACKLIST b/tests/auto/corelib/tools/collections/BLACKLIST new file mode 100644 index 00000000000..c6e289aadbe --- /dev/null +++ b/tests/auto/corelib/tools/collections/BLACKLIST @@ -0,0 +1,2 @@ +[insert_remove_loop] +msvc-2019 From 697910e5fbd382e78bc1bcbac3f5824aded059b4 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 28 Jun 2019 14:40:04 +0200 Subject: [PATCH 3/5] Fix assert in QPainterPath after clear() The newly introduced clear() method left the path in an undefined state: d_ptr allocated, but no elements. The elements vector is otherwise never empty, since ensureData() inserts a dummy initial moveTo element. Fix by making sure that clear() leaves the path in the same state as ensureData() (i.e. "empty" but not "null"), except possibly more capacity allocated in the elements vector. Fixes: QTBUG-76534 Change-Id: I7ad8b312913f5eb6e22023f5d2fd873e54b1e23c Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qpainterpath.cpp | 9 +++++---- src/gui/painting/qpainterpath_p.h | 2 +- .../gui/painting/qpainterpath/tst_qpainterpath.cpp | 10 +++++++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index d20faf89a2f..8516d73537b 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -661,6 +661,7 @@ void QPainterPath::clear() detach(); d_func()->clear(); + d_func()->elements.append( {0, 0, MoveToElement} ); } /*! @@ -2337,12 +2338,12 @@ bool QPainterPath::operator==(const QPainterPath &path) const { QPainterPathData *d = reinterpret_cast(d_func()); QPainterPathData *other_d = path.d_func(); - if (other_d == d) + if (other_d == d) { return true; - else if (!d || !other_d) { - if (!d && other_d->elements.empty() && other_d->fillRule == Qt::OddEvenFill) + } else if (!d || !other_d) { + if (!other_d && isEmpty() && elementAt(0) == QPointF() && d->fillRule == Qt::OddEvenFill) return true; - if (!other_d && d && d->elements.empty() && d->fillRule == Qt::OddEvenFill) + if (!d && path.isEmpty() && path.elementAt(0) == QPointF() && other_d->fillRule == Qt::OddEvenFill) return true; return false; } diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h index a36c8005bc3..567f1552106 100644 --- a/src/gui/painting/qpainterpath_p.h +++ b/src/gui/painting/qpainterpath_p.h @@ -298,7 +298,7 @@ inline void QPainterPathData::clear() elements.clear(); cStart = 0; - + fillRule = Qt::OddEvenFill; bounds = {}; controlBounds = {}; diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index c90348e91a6..67cf9a321af 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -161,10 +161,18 @@ void tst_QPainterPath::clear() p1.clear(); QCOMPARE(p1, p2); + p1.lineTo(50, 50); + QPainterPath p3; + QCOMPARE(p1.elementCount(), 2); + p3.lineTo(50, 50); + QCOMPARE(p1, p3); + QCOMPARE(p1.fillRule(), Qt::OddEvenFill); p1.setFillRule(Qt::WindingFill); + QVERIFY(p1 != p3); p1.clear(); - QCOMPARE(p1.fillRule(), Qt::WindingFill); + QCOMPARE(p1.fillRule(), Qt::OddEvenFill); + QCOMPARE(p1, p2); } void tst_QPainterPath::reserveAndCapacity() From 2dddc1c9f46f942491343654854ebe07858cd774 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 31 Jul 2019 15:39:37 +0200 Subject: [PATCH 4/5] Fix erroneous missing-cmake-tests errors After commit 9c7ebd191b9862c28e9c96a511ec2878b7a3591d, qmake would complain about missing cmake tests even for internal modules that have no application side C++ linkage that needs testing. Change-Id: I23b23c81dbe6be2b6da5672cbd7b8f8454ec2f66 Reviewed-by: Alexandru Croitor --- mkspecs/features/create_cmake.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index fe9149b1c10..376a7ded5d8 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -367,7 +367,7 @@ cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} # Other modules should either create proper tests in tests/auto/cmake or, as # a temporary measure, disable the generation of cmake files # with 'CONFIG -= create_cmake' -!equals(CMAKE_MODULE_TESTS, -) { +!internal_module:!equals(CMAKE_MODULE_TESTS, -) { isEmpty(CMAKE_MODULE_TESTS): CMAKE_MODULE_TESTS = $$MODULE_BASE_INDIR/tests/auto/cmake !exists($$CMAKE_MODULE_TESTS): \ error("Missing CMake tests. Either create tests in tests/auto/cmake," \ From 4d7271087e84096abd75fa806bea234daee0cd94 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 30 Jul 2019 21:11:16 +0200 Subject: [PATCH 5/5] QAbstractItemView: refine documentation for SingleSelection Since Qt5.1 it is possible to deselect the current selected item in SingleSelection mode when pressing the Ctrl key during the click but this was not mentioned in the docs. Change-Id: I86652308215bf218ea959f869334b6077e4634f9 Reviewed-by: Paul Wicking --- src/widgets/itemviews/qabstractitemview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 95631ffa5fe..cb99214d4e5 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -343,7 +343,7 @@ void QAbstractItemViewPrivate::_q_scrollerStateChanged() \value SingleSelection When the user selects an item, any already-selected item becomes unselected. It is possible for the user to deselect the selected - item. + item by pressing the Ctrl key when clicking the selected item. \value ContiguousSelection When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user