From 652085c5c2f843b1345e741352b4e2e8328f13fe Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 30 Jul 2019 12:47:33 +0200 Subject: 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(-) (limited to 'src') diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h index 5231b4fe6f..22109ac5bc 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; -- cgit v1.2.3 From 697910e5fbd382e78bc1bcbac3f5824aded059b4 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 28 Jun 2019 14:40:04 +0200 Subject: 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 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index d20faf89a2..8516d73537 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 a36c8005bc..567f155210 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 = {}; -- cgit v1.2.3 From 4d7271087e84096abd75fa806bea234daee0cd94 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 30 Jul 2019 21:11:16 +0200 Subject: 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(-) (limited to 'src') diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 95631ffa5f..cb99214d4e 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 -- cgit v1.2.3