1
0
forked from pool/libqt5-qtbase

Accepting request 727923 from KDE:Qt:5.13

- Add patch to fix crash during Drag-and-Drop:
  * 0001-Fix-crash-with-drag-cursor-handling.patch

OBS-URL: https://build.opensuse.org/request/show/727923
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=100
This commit is contained in:
Dominique Leuenberger 2019-09-07 09:30:12 +00:00 committed by Git OBS Bridge
commit 79af968809
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,46 @@
From d1141b6c90e53554f69fd6a7a272988211f5bd34 Mon Sep 17 00:00:00 2001
From: Joni Poikelin <joni.poikelin@qt.io>
Date: Thu, 28 Feb 2019 09:54:20 +0200
Subject: [PATCH] Fix crash with drag cursor handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
7a7c722782a435f7c01b94f48df7a5f4ff4d599e caused a regresssion in some
cases.
Change-Id: I1089a79534d811b195de663ff664d9ba5a6ac6c5
Fixes: QTBUG-74110
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
---
src/gui/kernel/qsimpledrag.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
index 9aab332ef5..bd409c124f 100644
--- a/src/gui/kernel/qsimpledrag.cpp
+++ b/src/gui/kernel/qsimpledrag.cpp
@@ -310,11 +310,15 @@ void QBasicDrag::updateCursor(Qt::DropAction action)
m_dndHasSetOverrideCursor = true;
} else {
QCursor *cursor = QGuiApplication::overrideCursor();
- if (!pixmap.isNull()) {
- if (cursor->pixmap().cacheKey() != pixmap.cacheKey())
- QGuiApplication::changeOverrideCursor(QCursor(pixmap));
- } else if (cursorShape != cursor->shape()) {
- QGuiApplication::changeOverrideCursor(QCursor(cursorShape));
+ if (!cursor) {
+ QGuiApplication::changeOverrideCursor(pixmap.isNull() ? QCursor(cursorShape) : QCursor(pixmap));
+ } else {
+ if (!pixmap.isNull()) {
+ if (cursor->pixmap().cacheKey() != pixmap.cacheKey())
+ QGuiApplication::changeOverrideCursor(QCursor(pixmap));
+ } else if (cursorShape != cursor->shape()) {
+ QGuiApplication::changeOverrideCursor(QCursor(cursorShape));
+ }
}
}
#endif
--
2.22.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Sep 2 08:26:30 UTC 2019 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix crash during Drag-and-Drop:
* 0001-Fix-crash-with-drag-cursor-handling.patch
-------------------------------------------------------------------
Sun Aug 11 20:57:31 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -85,6 +85,7 @@ Patch53: 0001-Revert-qmake-link-qt-libraries-by-full-path.patch
Patch60: 0001-Decrease-focusInTimer-timer-from-400-to-200.patch
# patches 1000-2000 and above from upstream 5.13 branch #
Patch1000: 0003-Add-an-ID-for-recognition-of-UGEE-tablets.patch
Patch1001: 0001-Fix-crash-with-drag-cursor-handling.patch
# patches 2000-3000 and above from upstream 5.14/dev branch #
Patch2000: 0001-Fix-notification-of-QDockWidget-when-it-gets-undocke.patch
# Not accepted yet, https://codereview.qt-project.org/c/qt/qtbase/+/255384