diff --git a/0001-Fix-crash-with-drag-cursor-handling.patch b/0001-Fix-crash-with-drag-cursor-handling.patch new file mode 100644 index 0000000..2ef8818 --- /dev/null +++ b/0001-Fix-crash-with-drag-cursor-handling.patch @@ -0,0 +1,46 @@ +From d1141b6c90e53554f69fd6a7a272988211f5bd34 Mon Sep 17 00:00:00 2001 +From: Joni Poikelin +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ø +--- + 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 + diff --git a/libqt5-qtbase.changes b/libqt5-qtbase.changes index c5b020f..37bdf91 100644 --- a/libqt5-qtbase.changes +++ b/libqt5-qtbase.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 2 08:26:30 UTC 2019 - Fabian Vogt + +- 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 diff --git a/libqt5-qtbase.spec b/libqt5-qtbase.spec index 39e3dd2..85e9059 100644 --- a/libqt5-qtbase.spec +++ b/libqt5-qtbase.spec @@ -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