Accepting request 448934 from home:wolfi323:branches:KDE:Extra
- Add Handle-arrow-key-press-in-brief-view.patch to fix the behavior when pressing the left/right cursor keys in brief view (boo#1017533, kde#374238) OBS-URL: https://build.opensuse.org/request/show/448934 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krusader?expand=0&rev=21
This commit is contained in:
parent
16f69110c1
commit
5d416d3ec9
81
Handle-arrow-key-press-in-brief-view.patch
Normal file
81
Handle-arrow-key-press-in-brief-view.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
From 991d28b4c9d14d860583cffd2b778d0f46c4f528 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Bikadorov <alex.bikadorov@kdemail.net>
|
||||||
|
Date: Thu, 29 Dec 2016 18:28:09 +0100
|
||||||
|
Subject: FIXED: [ 374238 ] Handle left/right arrow key press in brief view
|
||||||
|
(previously filtered by search bar).
|
||||||
|
|
||||||
|
Quickfix. It is maybe better to remove the filtering in KrSearchBar and instead get all key events from KrView.
|
||||||
|
Bug came with 374238.
|
||||||
|
|
||||||
|
BUG: 374238
|
||||||
|
---
|
||||||
|
krusader/Panel/krinterbriefview.cpp | 22 ++++++++++++++++------
|
||||||
|
krusader/Panel/krinterbriefview.h | 2 ++
|
||||||
|
2 files changed, 18 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/krusader/Panel/krinterbriefview.cpp b/krusader/Panel/krinterbriefview.cpp
|
||||||
|
index fcf4898..f4d38b8 100644
|
||||||
|
--- a/krusader/Panel/krinterbriefview.cpp
|
||||||
|
+++ b/krusader/Panel/krinterbriefview.cpp
|
||||||
|
@@ -146,9 +146,19 @@ void KrInterBriefView::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if (!e || !_model->ready())
|
||||||
|
return ; // subclass bug
|
||||||
|
- if ((e->key() != Qt::Key_Left && e->key() != Qt::Key_Right) &&
|
||||||
|
- (handleKeyEvent(e))) // did the view class handled the event?
|
||||||
|
+
|
||||||
|
+ if (handleKeyEvent(e))
|
||||||
|
return;
|
||||||
|
+
|
||||||
|
+ QAbstractItemView::keyPressEvent(e);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+bool KrInterBriefView::handleKeyEvent(QKeyEvent *e)
|
||||||
|
+{
|
||||||
|
+ if ((e->key() != Qt::Key_Left && e->key() != Qt::Key_Right) &&
|
||||||
|
+ (KrView::handleKeyEvent(e))) // did the view class handled the event?
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
switch (e->key()) {
|
||||||
|
case Qt::Key_Right : {
|
||||||
|
if (e->modifiers() == Qt::ControlModifier) { // let the panel handle it
|
||||||
|
@@ -178,7 +188,7 @@ void KrInterBriefView::keyPressEvent(QKeyEvent *e)
|
||||||
|
}
|
||||||
|
if (e->modifiers() & Qt::ShiftModifier)
|
||||||
|
op()->emitSelectionChanged();
|
||||||
|
- break;
|
||||||
|
+ return true;
|
||||||
|
}
|
||||||
|
case Qt::Key_Left : {
|
||||||
|
if (e->modifiers() == Qt::ControlModifier) { // let the panel handle it
|
||||||
|
@@ -208,11 +218,11 @@ void KrInterBriefView::keyPressEvent(QKeyEvent *e)
|
||||||
|
}
|
||||||
|
if (e->modifiers() & Qt::ShiftModifier)
|
||||||
|
op()->emitSelectionChanged();
|
||||||
|
- break;
|
||||||
|
+ return true;
|
||||||
|
}
|
||||||
|
- default:
|
||||||
|
- QAbstractItemView::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KrInterBriefView::wheelEvent(QWheelEvent *ev)
|
||||||
|
diff --git a/krusader/Panel/krinterbriefview.h b/krusader/Panel/krinterbriefview.h
|
||||||
|
index 6bc133b..88b286a 100644
|
||||||
|
--- a/krusader/Panel/krinterbriefview.h
|
||||||
|
+++ b/krusader/Panel/krinterbriefview.h
|
||||||
|
@@ -77,6 +77,8 @@ protected slots:
|
||||||
|
virtual void renameCurrentItem() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
+ // ---- reimplemented from KrView ----
|
||||||
|
+ virtual bool handleKeyEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
|
||||||
|
// ---- reimplemented from QAbstractItemView ----
|
||||||
|
virtual bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
virtual void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
|
||||||
|
--
|
||||||
|
cgit v0.11.2
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 5 21:20:49 UTC 2017 - wbauer@tmo.at
|
||||||
|
|
||||||
|
- Add Handle-arrow-key-press-in-brief-view.patch to fix the
|
||||||
|
behavior when pressing the left/right cursor keys in brief view
|
||||||
|
(boo#1017533, kde#374238)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 22 18:46:27 UTC 2016 - wbauer@tmo.at
|
Thu Dec 22 18:46:27 UTC 2016 - wbauer@tmo.at
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ Patch1: 0001-Don-t-hardcode-appdata-location.patch
|
|||||||
Patch2: Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch
|
Patch2: Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch
|
||||||
# PATCH-FIX-UPSTREAM add-service-actions-to-right-click-popup-menu.patch boo#1016980, kde#372231 -- add KDE's service actions to the right click popup menu in krusader again
|
# PATCH-FIX-UPSTREAM add-service-actions-to-right-click-popup-menu.patch boo#1016980, kde#372231 -- add KDE's service actions to the right click popup menu in krusader again
|
||||||
Patch3: add-service-actions-to-right-click-popup-menu.patch
|
Patch3: add-service-actions-to-right-click-popup-menu.patch
|
||||||
|
# PATCH-FIX-UPSTREAM Handle-arrow-key-press-in-brief-view.patch boo#1017533, kde#374238 -- fixes behavior when pressing the left/right cursor keys in brief view
|
||||||
|
Patch4: Handle-arrow-key-press-in-brief-view.patch
|
||||||
BuildRequires: extra-cmake-modules >= 1.1.0
|
BuildRequires: extra-cmake-modules >= 1.1.0
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
@ -94,6 +96,7 @@ An advanced twin panel (commander style) file manager for KDE.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export RPM_OPT_FLAGS="%{optflags} -fpermissive"
|
export RPM_OPT_FLAGS="%{optflags} -fpermissive"
|
||||||
|
Loading…
Reference in New Issue
Block a user