Accepting request 1207603 from KDE:Qt6
Qt 6.8.0 (forwarded request 1206590 from krop) OBS-URL: https://build.opensuse.org/request/show/1207603 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qt6-base?expand=0&rev=62
This commit is contained in:
commit
05b0f6b0ef
83
0001-QAbstractItemModelPrivate-add-resetting-member.patch
Normal file
83
0001-QAbstractItemModelPrivate-add-resetting-member.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From 9785bc77eb4967c4a791eef1745c0c4f2b0db95a Mon Sep 17 00:00:00 2001
|
||||
From: Mitch Curtis <mitch.curtis@qt.io>
|
||||
Date: Tue, 24 Sep 2024 10:40:37 +0800
|
||||
Subject: [PATCH] QAbstractItemModelPrivate: add resetting member
|
||||
|
||||
This allows QQmlDelegateModel to know if a QAbstractItemModel subclass
|
||||
is in the process of a reset, which it can't know if beginResetModel
|
||||
was called in the model's constructor.
|
||||
|
||||
As an added bonus, it also allows us to warn the user if they call
|
||||
endResetModel with a previous call to beginResetModel.
|
||||
|
||||
Task-number: QTBUG-125053
|
||||
Task-number: QTBUG-127340
|
||||
Pick-to: 6.5
|
||||
Change-Id: I7d1fb983e9bf868c48472624ad945ae158115943
|
||||
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
||||
(cherry picked from commit 9d8663c18e88cb0b5a65f86cfd7726f3d31e04d6)
|
||||
(cherry picked from commit 2ea3abed0125d81ca4f3bacb9650db7314657332)
|
||||
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||
---
|
||||
src/corelib/itemmodels/qabstractitemmodel.cpp | 13 +++++++++++++
|
||||
src/corelib/itemmodels/qabstractitemmodel_p.h | 4 ++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
|
||||
index 5b9b215..3d4d566 100644
|
||||
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
|
||||
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
|
||||
@@ -3400,6 +3400,13 @@ void QAbstractItemModel::endMoveColumns()
|
||||
*/
|
||||
void QAbstractItemModel::beginResetModel()
|
||||
{
|
||||
+ Q_D(QAbstractItemModel);
|
||||
+ if (d->resetting) {
|
||||
+ qWarning() << "beginResetModel called on" << this << "without calling endResetModel first";
|
||||
+ // Warn, but don't return early in case user code relies on the incorrect behavior.
|
||||
+ }
|
||||
+
|
||||
+ d->resetting = true;
|
||||
emit modelAboutToBeReset(QPrivateSignal());
|
||||
}
|
||||
|
||||
@@ -3417,8 +3424,14 @@ void QAbstractItemModel::beginResetModel()
|
||||
void QAbstractItemModel::endResetModel()
|
||||
{
|
||||
Q_D(QAbstractItemModel);
|
||||
+ if (!d->resetting) {
|
||||
+ qWarning() << "endResetModel called on" << this << "without calling beginResetModel first";
|
||||
+ // Warn, but don't return early in case user code relies on the incorrect behavior.
|
||||
+ }
|
||||
+
|
||||
d->invalidatePersistentIndexes();
|
||||
resetInternalData();
|
||||
+ d->resetting = false;
|
||||
emit modelReset(QPrivateSignal());
|
||||
}
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
|
||||
index e34dc32..c2113fd 100644
|
||||
--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
|
||||
+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
|
||||
@@ -45,6 +45,8 @@ public:
|
||||
QAbstractItemModelPrivate();
|
||||
~QAbstractItemModelPrivate();
|
||||
|
||||
+ static const QAbstractItemModelPrivate *get(const QAbstractItemModel *model) { return model->d_func(); }
|
||||
+
|
||||
void removePersistentIndexData(QPersistentModelIndexData *data);
|
||||
void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
|
||||
Qt::Orientation orientation);
|
||||
@@ -115,6 +117,8 @@ public:
|
||||
void insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data);
|
||||
} persistent;
|
||||
|
||||
+ bool resetting = false;
|
||||
+
|
||||
static const QHash<int,QByteArray> &defaultRoleNames();
|
||||
static bool isVariantLessThan(const QVariant &left, const QVariant &right,
|
||||
Qt::CaseSensitivity cs = Qt::CaseSensitive, bool isLocaleAware = false);
|
||||
--
|
||||
2.46.1
|
||||
|
@ -1,167 +0,0 @@
|
||||
From 1337291b725b0ab5958191f35ac69b8fabf0a510 Mon Sep 17 00:00:00 2001
|
||||
From: Liang Qi <liang.qi@qt.io>
|
||||
Date: Tue, 1 Oct 2024 12:46:30 +0200
|
||||
Subject: [PATCH] Revert "xcb: handle XI2 input button and motion events from
|
||||
slave devices"
|
||||
|
||||
This reverts commit b71be292780b858f2c55ce92601452e2ea946de2, which causes a regression when using mouse wheel and moving cursor together
|
||||
on scroll bar for some qt applications, like qutebrowser and
|
||||
qbittorrent.
|
||||
|
||||
Fixes: QTBUG-129509
|
||||
Fixes: QTBUG-129514
|
||||
Task-number: QTBUG-110841
|
||||
Pick-to: 6.8.0 6.8 6.7 6.5 6.2 5.15
|
||||
Change-Id: I703158874413a1306ea99217bced4ba38382f543
|
||||
---
|
||||
.../platforms/xcb/qxcbconnection_xi2.cpp | 121 +++---------------
|
||||
1 file changed, 16 insertions(+), 105 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||||
index 55c226d..4f62a18 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||||
@@ -682,96 +682,23 @@ static inline qreal fixed1616ToReal(xcb_input_fp1616_t val)
|
||||
return qreal(val) / 0x10000;
|
||||
}
|
||||
|
||||
-//implementation is ported from https://codereview.qt-project.org/c/qt/qtbase/+/231552/12/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp#558
|
||||
-namespace {
|
||||
-
|
||||
-/*! \internal
|
||||
-
|
||||
- Qt listens for XIAllDevices to avoid losing mouse events. This function
|
||||
- ensures that we don't process the same event twice: from a slave device and
|
||||
- then again from a master device.
|
||||
-
|
||||
- In a normal use case (e.g. mouse press and release inside a window), we will
|
||||
- drop events from master devices as duplicates. Other advantage of processing
|
||||
- events from slave devices is that they don't share button state. All buttons
|
||||
- on a master device share the state.
|
||||
-
|
||||
- Examples of special cases:
|
||||
-
|
||||
-\list
|
||||
-
|
||||
-\li During system move/resize, window manager (_NET_WM_MOVERESIZE) grabs the
|
||||
- master pointer, in this case we process the matching release from the slave
|
||||
- device. A master device event is not sent by the server, hence no duplicate
|
||||
- event to drop. If we listened for XIAllMasterDevices instead, we would never
|
||||
- see a release event in this case.
|
||||
-
|
||||
-\li If we dismiss a context menu by clicking somewhere outside a Qt application,
|
||||
- we will process the mouse press from the master pointer as that is the
|
||||
- device we are grabbing. We are not grabbing slave devices (grabbing on the
|
||||
- slave device is buggy according to 19d289ab1b5bde3e136765e5432b5c7d004df3a4).
|
||||
- And since the event occurs outside our window, the slave device event is
|
||||
- not sent to us by the server, hence no duplicate event to drop.
|
||||
-
|
||||
-\endlist
|
||||
-*/
|
||||
-bool isDuplicateEvent(xcb_ge_event_t *event)
|
||||
-{
|
||||
- Q_ASSERT(event);
|
||||
-
|
||||
- struct qXIEvent {
|
||||
- bool isValid = false;
|
||||
- uint16_t sourceid;
|
||||
- uint8_t evtype;
|
||||
- uint32_t detail;
|
||||
- int32_t root_x;
|
||||
- int32_t root_y;
|
||||
- };
|
||||
- static qXIEvent lastSeenEvent;
|
||||
-
|
||||
- bool isDuplicate = false;
|
||||
- auto *xiDeviceEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
|
||||
- if (lastSeenEvent.isValid) {
|
||||
- isDuplicate = lastSeenEvent.sourceid == xiDeviceEvent->sourceid &&
|
||||
- lastSeenEvent.evtype == xiDeviceEvent->event_type &&
|
||||
- lastSeenEvent.detail == xiDeviceEvent->detail &&
|
||||
- lastSeenEvent.root_x == xiDeviceEvent->root_x &&
|
||||
- lastSeenEvent.root_y == xiDeviceEvent->root_y;
|
||||
- } else {
|
||||
- lastSeenEvent.isValid = true;
|
||||
- }
|
||||
- lastSeenEvent.sourceid = xiDeviceEvent->sourceid;
|
||||
- lastSeenEvent.evtype = xiDeviceEvent->event_type;
|
||||
- lastSeenEvent.detail = xiDeviceEvent->detail;
|
||||
- lastSeenEvent.root_x = xiDeviceEvent->root_x;
|
||||
- lastSeenEvent.root_y = xiDeviceEvent->root_y;
|
||||
-
|
||||
- if (isDuplicate) {
|
||||
- qCDebug(lcQpaXInputEvents, "Duplicate XI2 event %d", event->event_type);
|
||||
- // This sanity check ensures that special cases like QTBUG-59277 keep working.
|
||||
- lastSeenEvent.isValid = false; // An event can be a duplicate only once.
|
||||
- }
|
||||
-
|
||||
- return isDuplicate;
|
||||
-}
|
||||
-
|
||||
-} // namespace
|
||||
-
|
||||
void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
|
||||
{
|
||||
auto *xiEvent = reinterpret_cast<qt_xcb_input_device_event_t *>(event);
|
||||
- if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) {
|
||||
- if (!(xiEvent->event_type == XCB_INPUT_BUTTON_PRESS
|
||||
- || xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
|
||||
- || xiEvent->event_type == XCB_INPUT_MOTION)) {
|
||||
- if (!m_duringSystemMoveResize)
|
||||
- return;
|
||||
- if (xiEvent->event == XCB_NONE)
|
||||
- return;
|
||||
-
|
||||
- if (xiEvent->event_type == XCB_INPUT_TOUCH_END)
|
||||
- abortSystemMoveResize(xiEvent->event);
|
||||
+ setTime(xiEvent->time);
|
||||
+ if (m_xiSlavePointerIds.contains(xiEvent->deviceid) && xiEvent->event_type != XCB_INPUT_PROPERTY) {
|
||||
+ if (!m_duringSystemMoveResize)
|
||||
+ return;
|
||||
+ if (xiEvent->event == XCB_NONE)
|
||||
+ return;
|
||||
|
||||
+ if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
|
||||
+ && xiEvent->detail == XCB_BUTTON_INDEX_1 ) {
|
||||
+ abortSystemMoveResize(xiEvent->event);
|
||||
+ } else if (xiEvent->event_type == XCB_INPUT_TOUCH_END) {
|
||||
+ abortSystemMoveResize(xiEvent->event);
|
||||
+ return;
|
||||
+ } else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -783,27 +710,11 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
|
||||
switch (xiEvent->event_type) {
|
||||
case XCB_INPUT_BUTTON_PRESS:
|
||||
case XCB_INPUT_BUTTON_RELEASE:
|
||||
- case XCB_INPUT_MOTION: {
|
||||
- if (isDuplicateEvent(event))
|
||||
- return;
|
||||
- if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) {
|
||||
- if (m_duringSystemMoveResize) {
|
||||
- if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE
|
||||
- && xiEvent->detail == XCB_BUTTON_INDEX_1 ) {
|
||||
- abortSystemMoveResize(xiEvent->event);
|
||||
- } else {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- xiDeviceEvent = xiEvent;
|
||||
- eventListener = windowEventListenerFromId(xiDeviceEvent->event);
|
||||
- sourceDeviceId = xiDeviceEvent->sourceid; // use the actual device id instead of the master
|
||||
- break;
|
||||
- }
|
||||
+ case XCB_INPUT_MOTION:
|
||||
case XCB_INPUT_TOUCH_BEGIN:
|
||||
case XCB_INPUT_TOUCH_UPDATE:
|
||||
- case XCB_INPUT_TOUCH_END: {
|
||||
+ case XCB_INPUT_TOUCH_END:
|
||||
+ {
|
||||
xiDeviceEvent = xiEvent;
|
||||
eventListener = windowEventListenerFromId(xiDeviceEvent->event);
|
||||
sourceDeviceId = xiDeviceEvent->sourceid; // use the actual device id instead of the master
|
||||
--
|
||||
2.46.1
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 8 09:29:39 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Update to 6.8.0:
|
||||
* https://www.qt.io/blog/qt-6.8-released
|
||||
- Add upstream change (needed for kde 493116's bugfix):
|
||||
* 0001-QAbstractItemModelPrivate-add-resetting-member.patch
|
||||
- Drop patch, merged upstream:
|
||||
* 0001-Revert-xcb-handle-XI2-input-button-and-motion-events.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 1 22:23:35 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
#
|
||||
|
||||
|
||||
%define real_version 6.7.3
|
||||
%define short_version 6.7
|
||||
%define real_version 6.8.0
|
||||
%define short_version 6.8
|
||||
%define tar_name qtbase-everywhere-src
|
||||
%define tar_suffix %{nil}
|
||||
#
|
||||
@ -33,7 +33,7 @@
|
||||
%bcond_without system_md4c
|
||||
%endif
|
||||
Name: qt6-base%{?pkg_suffix}
|
||||
Version: 6.7.3
|
||||
Version: 6.8.0
|
||||
Release: 0
|
||||
Summary: Qt 6 core components (Core, Gui, Widgets, Network...)
|
||||
# Legal: qtpaths is BSD-3-Clause
|
||||
@ -42,7 +42,7 @@ URL: https://www.qt.io
|
||||
Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
|
||||
Source99: qt6-base-rpmlintrc
|
||||
# Patches 0-100 are upstream patches #
|
||||
Patch0: 0001-Revert-xcb-handle-XI2-input-button-and-motion-events.patch
|
||||
Patch0: 0001-QAbstractItemModelPrivate-add-resetting-member.patch
|
||||
# Patches 100-200 are openSUSE and/or non-upstream(able) patches #
|
||||
# No need to pollute the library dir with object files, install them in the qt6 subfolder
|
||||
Patch100: 0001-CMake-Install-objects-files-into-ARCHDATADIR.patch
|
||||
@ -833,6 +833,13 @@ rm %{buildroot}%{_qt6_libexecdir}/sanitizer-testrunner.py
|
||||
# This is only for Apple platforms and has a python2 dep
|
||||
rm -r %{buildroot}%{_qt6_mkspecsdir}/features/uikit
|
||||
|
||||
# Not useful for desktop installs
|
||||
rm -r %{buildroot}%{_qt6_cmakedir}/Qt6ExamplesAssetDownloaderPrivate
|
||||
rm -r %{buildroot}%{_qt6_includedir}/QtExamplesAssetDownloader
|
||||
rm %{buildroot}%{_qt6_descriptionsdir}/ExamplesAssetDownloaderPrivate.json
|
||||
rm %{buildroot}%{_qt6_libdir}/libQt6ExamplesAssetDownloader.*
|
||||
rm %{buildroot}%{_qt6_metatypesdir}/qt6examplesassetdownloaderprivate_*_metatypes.json
|
||||
|
||||
%ldconfig_scriptlets -n libQt6Concurrent6
|
||||
%ldconfig_scriptlets -n libQt6Core6
|
||||
%ldconfig_scriptlets -n libQt6DBus6
|
||||
@ -1196,8 +1203,8 @@ rm -r %{buildroot}%{_qt6_mkspecsdir}/features/uikit
|
||||
%{_qt6_libdir}/libQt6ExampleIcons.prl
|
||||
# There's no mistake, this folder needs to be installed
|
||||
# These are CMake objects files which are not part of any library
|
||||
%dir %{_qt6_archdatadir}/objects-RelWithDebInfo
|
||||
%{_qt6_archdatadir}/objects-RelWithDebInfo/ExampleIconsPrivate_resources_1/
|
||||
%dir %{_qt6_archdatadir}/objects-*
|
||||
%{_qt6_archdatadir}/objects-*/ExampleIconsPrivate_resources_1/
|
||||
%{_qt6_metatypesdir}/qt6exampleiconsprivate_*_metatypes.json
|
||||
|
||||
%files -n qt6-kmssupport-devel-static
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8ccbb9ab055205ac76632c9eeddd1ed6fc66936fc56afc2ed0fd5d9e23da3097
|
||||
size 49426156
|
3
qtbase-everywhere-src-6.8.0.tar.xz
Normal file
3
qtbase-everywhere-src-6.8.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1bad481710aa27f872de6c9f72651f89a6107f0077003d0ebfcc9fd15cba3c75
|
||||
size 49819628
|
Loading…
x
Reference in New Issue
Block a user