Accepting request 559646 from KDE:Frameworks5
- Dropped patches, now upstream: - MouseEventListener-Allow-accepting-mouse-event.patch - Update to 5.41.0 * New feature release * For more details please see: * https://www.kde.org/announcements/kde-frameworks-5.41.0.php - Changes since 5.40.0: * Make it compile on windows * make it compile with QT_NO_CAST_FROM_ASCII/QT_NO_CAST_FROM_BYTEARRAY * [MouseEventListener] Allow accepting mouse event * use a single QML engine * add some metadata OBS-URL: https://build.opensuse.org/request/show/559646 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdeclarative?expand=0&rev=50
This commit is contained in:
commit
796291b0c7
@ -1,147 +0,0 @@
|
|||||||
From e2795e9472333d5e8b2ce70017ca705474ebe3d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kai Uwe Broulik <kde@privat.broulik.de>
|
|
||||||
Date: Thu, 23 Nov 2017 11:04:01 +0100
|
|
||||||
Subject: [MouseEventListener] Allow accepting mouse event
|
|
||||||
|
|
||||||
This will keep the event from propagating. Accepting a press event will also not result in
|
|
||||||
clicked or pressAndHold being handled.
|
|
||||||
|
|
||||||
In Qt 5.10 event propagation changed resulting in FolderView opening both the item context menu
|
|
||||||
and containment context menu. Imho this actually makes sense since we never accepted the
|
|
||||||
mouse event there.
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.kde.org/D8864
|
|
||||||
---
|
|
||||||
.../kquickcontrolsaddons/mouseeventlistener.cpp | 30 ++++++++++++++++++++++
|
|
||||||
.../kquickcontrolsaddons/mouseeventlistener.h | 13 ++++++++++
|
|
||||||
2 files changed, 43 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
|
|
||||||
index 0b8d981..10aa2f7 100644
|
|
||||||
--- a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
|
|
||||||
+++ b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp
|
|
||||||
@@ -171,6 +171,11 @@ void MouseEventListener::mousePressEvent(QMouseEvent *me)
|
|
||||||
emit pressed(&dme);
|
|
||||||
emit pressedChanged();
|
|
||||||
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ me->setAccepted(true);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
m_pressAndHoldTimer->start(QGuiApplication::styleHints()->mousePressAndHoldInterval());
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -187,6 +192,10 @@ void MouseEventListener::mouseMoveEvent(QMouseEvent *me)
|
|
||||||
|
|
||||||
KDeclarativeMouseEvent dme(me->pos().x(), me->pos().y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos()));
|
|
||||||
emit positionChanged(&dme);
|
|
||||||
+
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ me->setAccepted(true);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void MouseEventListener::mouseReleaseEvent(QMouseEvent *me)
|
|
||||||
@@ -205,6 +214,10 @@ void MouseEventListener::mouseReleaseEvent(QMouseEvent *me)
|
|
||||||
emit clicked(&dme);
|
|
||||||
m_pressAndHoldTimer->stop();
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ me->setAccepted(true);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void MouseEventListener::wheelEvent(QWheelEvent *we)
|
|
||||||
@@ -260,7 +273,12 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
|
|
||||||
emit pressed(&dme);
|
|
||||||
emit pressedChanged();
|
|
||||||
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
m_pressAndHoldTimer->start(QGuiApplication::styleHints()->mousePressAndHoldInterval());
|
|
||||||
+
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QEvent::HoverMove: {
|
|
||||||
@@ -280,6 +298,10 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
|
|
||||||
KDeclarativeMouseEvent dme(myPos.x(), myPos.y(), screenPos.x(), screenPos.y(), Qt::NoButton, Qt::NoButton, he->modifiers(), nullptr);
|
|
||||||
//qDebug() << "positionChanged..." << dme.x() << dme.y();
|
|
||||||
emit positionChanged(&dme);
|
|
||||||
+
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QEvent::MouseMove: {
|
|
||||||
@@ -304,6 +326,10 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
|
|
||||||
m_pressAndHoldEvent = new KDeclarativeMouseEvent(myPos.x(), myPos.y(), me->screenPos().x(), me->screenPos().y(), me->button(), me->buttons(), me->modifiers(), screenForGlobalPos(me->globalPos()));
|
|
||||||
}
|
|
||||||
emit positionChanged(&dme);
|
|
||||||
+
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QEvent::MouseButtonRelease: {
|
|
||||||
@@ -321,6 +347,10 @@ bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
|
|
||||||
emit clicked(&dme);
|
|
||||||
m_pressAndHoldTimer->stop();
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (dme.isAccepted()) {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QEvent::UngrabMouse: {
|
|
||||||
diff --git a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h
|
|
||||||
index 2799fda..c34ca25 100644
|
|
||||||
--- a/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h
|
|
||||||
+++ b/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.h
|
|
||||||
@@ -43,6 +43,7 @@ class KDeclarativeMouseEvent : public QObject
|
|
||||||
Q_PROPERTY(Qt::MouseButtons buttons READ buttons)
|
|
||||||
Q_PROPERTY(Qt::KeyboardModifiers modifiers READ modifiers)
|
|
||||||
Q_PROPERTY(QScreen* screen READ screen CONSTANT)
|
|
||||||
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted NOTIFY acceptedChanged)
|
|
||||||
|
|
||||||
public:
|
|
||||||
KDeclarativeMouseEvent(int x, int y, int screenX, int screenY,
|
|
||||||
@@ -69,10 +70,21 @@ public:
|
|
||||||
Qt::KeyboardModifiers modifiers() const { return m_modifiers; }
|
|
||||||
QScreen* screen() const { return m_screen; }
|
|
||||||
|
|
||||||
+ bool isAccepted() const { return m_accepted; }
|
|
||||||
+ void setAccepted(bool accepted) {
|
|
||||||
+ if (m_accepted != accepted) {
|
|
||||||
+ m_accepted = accepted;
|
|
||||||
+ emit acceptedChanged();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// only for internal usage
|
|
||||||
void setX(int x) { m_x = x; }
|
|
||||||
void setY(int y) { m_y = y; }
|
|
||||||
|
|
||||||
+Q_SIGNALS:
|
|
||||||
+ void acceptedChanged();
|
|
||||||
+
|
|
||||||
private:
|
|
||||||
int m_x;
|
|
||||||
int m_y;
|
|
||||||
@@ -82,6 +94,7 @@ private:
|
|
||||||
Qt::MouseButtons m_buttons;
|
|
||||||
Qt::KeyboardModifiers m_modifiers;
|
|
||||||
QScreen *m_screen;
|
|
||||||
+ bool m_accepted = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
class KDeclarativeWheelEvent : public QObject
|
|
||||||
--
|
|
||||||
cgit v0.11.2
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a60142c4c1b14756196ebb90db63fd1214efe8ed921afa8b6b956caed23bd783
|
|
||||||
size 167988
|
|
3
kdeclarative-5.41.0.tar.xz
Normal file
3
kdeclarative-5.41.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ea49d799f2773939a1d704a7d8f6f43dfc27d07090ab99d63055f6d3c8cfaec3
|
||||||
|
size 168424
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 20 06:37:45 UTC 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Dropped patches, now upstream:
|
||||||
|
- MouseEventListener-Allow-accepting-mouse-event.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 18 16:55:36 UTC 2017 - wbauer@tmo.at
|
Mon Dec 18 16:55:36 UTC 2017 - wbauer@tmo.at
|
||||||
|
|
||||||
@ -5,6 +11,20 @@ Mon Dec 18 16:55:36 UTC 2017 - wbauer@tmo.at
|
|||||||
it possible to fix double context menu issue with Qt 5.10 in
|
it possible to fix double context menu issue with Qt 5.10 in
|
||||||
plasma5-desktop (kde#387199)
|
plasma5-desktop (kde#387199)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 17 09:43:48 CET 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 5.41.0
|
||||||
|
* New feature release
|
||||||
|
* For more details please see:
|
||||||
|
* https://www.kde.org/announcements/kde-frameworks-5.41.0.php
|
||||||
|
- Changes since 5.40.0:
|
||||||
|
* Make it compile on windows
|
||||||
|
* make it compile with QT_NO_CAST_FROM_ASCII/QT_NO_CAST_FROM_BYTEARRAY
|
||||||
|
* [MouseEventListener] Allow accepting mouse event
|
||||||
|
* use a single QML engine
|
||||||
|
* add some metadata
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 13 07:01:13 CET 2017 - lbeltrame@kde.org
|
Mon Nov 13 07:01:13 CET 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
%bcond_without lang
|
%bcond_without lang
|
||||||
%define lname libKF5Declarative5
|
%define lname libKF5Declarative5
|
||||||
%define _tar_path 5.40
|
%define _tar_path 5.41
|
||||||
# Full KF5 version (e.g. 5.33.0)
|
# Full KF5 version (e.g. 5.33.0)
|
||||||
%{!?_kf5_version: %global _kf5_version %{version}}
|
%{!?_kf5_version: %global _kf5_version %{version}}
|
||||||
# Last major and minor KF5 version (e.g. 5.33)
|
# Last major and minor KF5 version (e.g. 5.33)
|
||||||
%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
|
%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
|
||||||
Name: kdeclarative
|
Name: kdeclarative
|
||||||
Version: 5.40.0
|
Version: 5.41.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
|
||||||
@ -36,8 +36,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
|
|
||||||
Patch: MouseEventListener-Allow-accepting-mouse-event.patch
|
|
||||||
BuildRequires: cmake >= 3.0
|
BuildRequires: cmake >= 3.0
|
||||||
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
|
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -124,7 +122,6 @@ Development files.
|
|||||||
%lang_package -n %lname
|
%lang_package -n %lname
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build
|
%cmake_kf5 -d build
|
||||||
|
Loading…
Reference in New Issue
Block a user