Accepting request 509894 from KDE:Frameworks5
KDE Frameworks 5.36.0 OBS-URL: https://build.opensuse.org/request/show/509894 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdeclarative?expand=0&rev=44
This commit is contained in:
commit
aa09bed20c
@ -1,88 +0,0 @@
|
|||||||
From 3a832a27fc655ea39c8a2943ad9af41213fea8df Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eike Hein <hein@kde.org>
|
|
||||||
Date: Sat, 17 Jun 2017 12:19:26 +0200
|
|
||||||
Subject: [PATCH] Don't rely on QQuickWindow delivering QEvent::Ungrab as
|
|
||||||
mouseUngrabEvent (as it no longer does in Qt 5.8+)
|
|
||||||
|
|
||||||
Summary:
|
|
||||||
QQuickWindow::sendEvent in Qt 5.7 and older had the following code
|
|
||||||
to deliver QEvent::UngrabMouse by calling QQuickItem::mouseUngrabEvent:
|
|
||||||
|
|
||||||
case QEvent::UngrabMouse: {
|
|
||||||
QSet<QQuickItem *> hasFiltered;
|
|
||||||
if (!d->sendFilteredMouseEvent(item->parentItem(), item, e, &hasFiltered)) {
|
|
||||||
e->accept();
|
|
||||||
item->mouseUngrabEvent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
This is gone from Qt 5.8+. While QEvent::Ungrab is still delivered to
|
|
||||||
items, QQuickItem::mouseUngrabEvent is only called under constrained
|
|
||||||
circumstances elsewhere, e.g. when ending an actual mouse grab held by
|
|
||||||
an item and tracked by Qt.
|
|
||||||
|
|
||||||
MouseEventListener relied on mouseUngrabEvent being called to implement
|
|
||||||
something akin to MouseArea::canceled: Signaling a user it should clean
|
|
||||||
up state after a press event, instead of, say, assuming the button is
|
|
||||||
still held and waiting around for a release event. While QEvent::Ungrab
|
|
||||||
was already being intercepted as well, it was only done for event de-
|
|
||||||
duplication, not used for the above.
|
|
||||||
|
|
||||||
This changes the code so handleUngrab checks first whether we're
|
|
||||||
actually in press state (to make it safe to call repeatedly) and then
|
|
||||||
call it from both the generic event handler and mouseUngrabEvent. This
|
|
||||||
makes it work again with newer Qts.
|
|
||||||
|
|
||||||
We rely on this particularly in the desktop containment, where we use
|
|
||||||
EventGenerator from this same lib to deliver QEvent::Ungrab to applets
|
|
||||||
when the containment goes into applet move mode on press-and-hold.
|
|
||||||
Without MouseEventListener emiting canceled in response, e.g. moving
|
|
||||||
a Folder View applet will e.g. put it into rectangle selection mode
|
|
||||||
unwanted.
|
|
||||||
BUG:380354
|
|
||||||
|
|
||||||
Reviewers: #plasma, davidedmundson
|
|
||||||
|
|
||||||
Reviewed By: #plasma, davidedmundson
|
|
||||||
|
|
||||||
Subscribers: plasma-devel, #frameworks
|
|
||||||
|
|
||||||
Tags: #plasma, #frameworks
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.kde.org/D6246
|
|
||||||
---
|
|
||||||
src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp | 11 +++++++----
|
|
||||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
|
|
||||||
index af4d76f..0b8d981 100644
|
|
||||||
--- a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
|
|
||||||
+++ b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
|
|
||||||
@@ -325,6 +325,7 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
|
|
||||||
}
|
|
||||||
case QEvent::UngrabMouse: {
|
|
||||||
m_lastEvent = event;
|
|
||||||
+ handleUngrab();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QEvent::Wheel: {
|
|
||||||
@@ -368,10 +369,12 @@ void MouseEventListener::touchUngrabEvent()
|
|
||||||
|
|
||||||
void MouseEventListener::handleUngrab()
|
|
||||||
{
|
|
||||||
- m_pressAndHoldTimer->stop();
|
|
||||||
+ if (m_pressed) {
|
|
||||||
+ m_pressAndHoldTimer->stop();
|
|
||||||
|
|
||||||
- m_pressed = false;
|
|
||||||
- emit pressedChanged();
|
|
||||||
+ m_pressed = false;
|
|
||||||
+ emit pressedChanged();
|
|
||||||
|
|
||||||
- emit canceled();
|
|
||||||
+ emit canceled();
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.13.0
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ea619bf8da67d7b9caff3bc07bb645163fb47ae373eb5b22e2cbc0de4050f271
|
|
||||||
size 2688476
|
|
3
kdeclarative-5.36.0.tar.xz
Normal file
3
kdeclarative-5.36.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2dde12110310cbb980381fd51c0926f2f5cf202760a0a871a01a2412080a5d52
|
||||||
|
size 169912
|
@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 12 07:13:59 CEST 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 5.36.0
|
||||||
|
* New feature release
|
||||||
|
* For more details please see:
|
||||||
|
* https://www.kde.org/announcements/kde-frameworks-5.36.0.php
|
||||||
|
- Changes since 5.35.0:
|
||||||
|
* KKeySequenceItem: make it possible to record Ctrl+Num+1 as a shortcut.
|
||||||
|
* Start drag with press and hold on touch events (kde#368698)
|
||||||
|
* Don't rely on QQuickWindow delivering QEvent::Ungrab as mouseUngrabEvent (as it no longer does in Qt 5.8+) (kde#380354)
|
||||||
|
* [FEATURE] Option to build & install QCH file with the public API dox
|
||||||
|
- Drop upstreamed patches:
|
||||||
|
* 0001-Don-t-rely-on-QQuickWindow-delivering-QEvent-Ungrab-.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jun 17 10:20:31 UTC 2017 - fabian@ritter-vogt.de
|
Sat Jun 17 10:20:31 UTC 2017 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
%bcond_without lang
|
%bcond_without lang
|
||||||
%define lname libKF5Declarative5
|
%define lname libKF5Declarative5
|
||||||
%define _tar_path 5.35
|
%define _tar_path 5.36
|
||||||
Name: kdeclarative
|
Name: kdeclarative
|
||||||
Version: 5.35.0
|
Version: 5.36.0
|
||||||
Release: 0
|
Release: 0
|
||||||
%define kf5_version %{version}
|
%define kf5_version %{version}
|
||||||
Summary: Integration of QML and KDE workspaces
|
Summary: Integration of QML and KDE workspaces
|
||||||
@ -29,8 +29,6 @@ Group: System/GUI/KDE
|
|||||||
Url: http://www.kde.org
|
Url: http://www.kde.org
|
||||||
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
|
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
# PATCH-FIX-UPSTREAM
|
|
||||||
Patch100: 0001-Don-t-rely-on-QQuickWindow-delivering-QEvent-Ungrab-.patch
|
|
||||||
BuildRequires: cmake >= 3.0
|
BuildRequires: cmake >= 3.0
|
||||||
BuildRequires: extra-cmake-modules >= %{_tar_path}
|
BuildRequires: extra-cmake-modules >= %{_tar_path}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -117,7 +115,6 @@ Development files.
|
|||||||
%lang_package -n %lname
|
%lang_package -n %lname
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch100 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build
|
%cmake_kf5 -d build
|
||||||
|
Loading…
Reference in New Issue
Block a user