From 4008dfc4b443672262453e39f5f681bd964c363bce7cc155c33239076128ed4a Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sat, 25 Oct 2014 17:42:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/milou5?expand=0&rev=19 --- ...ltsView-Handle-both-Enter-and-Return.patch | 30 ++++++++++++++++ ...del-Only-consider-each-types-first-r.patch | 35 +++++++++++++++++++ milou5.changes | 8 +++++ milou5.spec | 7 ++++ 4 files changed, 80 insertions(+) create mode 100644 0001-ResultsView-Handle-both-Enter-and-Return.patch create mode 100644 0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch diff --git a/0001-ResultsView-Handle-both-Enter-and-Return.patch b/0001-ResultsView-Handle-both-Enter-and-Return.patch new file mode 100644 index 0000000..f25618e --- /dev/null +++ b/0001-ResultsView-Handle-both-Enter-and-Return.patch @@ -0,0 +1,30 @@ +From 5112aff7efb7c2bc74fbe1eb41bc286c37fd706c Mon Sep 17 00:00:00 2001 +From: Vishesh Handa +Date: Mon, 20 Oct 2014 13:09:43 +0200 +Subject: [PATCH 1/3] ResultsView: Handle both Enter and Return + +BUG: 339628 +--- + lib/qml/ResultsView.qml | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lib/qml/ResultsView.qml b/lib/qml/ResultsView.qml +index d962703..bbb452a 100644 +--- a/lib/qml/ResultsView.qml ++++ b/lib/qml/ResultsView.qml +@@ -77,6 +77,12 @@ ListView { + } + runCurrentIndex(); + } ++ Keys.onEnterPressed: { ++ if (!currentIndex) { ++ runAutomatically = true ++ } ++ runCurrentIndex(); ++ } + + function runCurrentIndex() { + listView.model.run(currentIndex); +-- +2.1.2 + diff --git a/0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch b/0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch new file mode 100644 index 0000000..9d7dc20 --- /dev/null +++ b/0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch @@ -0,0 +1,35 @@ +From 366dc912823a0b138c92c9690df3272256b76d01 Mon Sep 17 00:00:00 2001 +From: Vishesh Handa +Date: Mon, 20 Oct 2014 14:32:47 +0200 +Subject: [PATCH 2/3] Revert "SourcesModel: Only consider each types first + result for priority" + +This reverts commit 3e4bb6b1a7cd3df47b460cd0a7222605eeddd104. + +Only considering the top most item is not ideal as the top most item +changes a lot based on which result you pick because krunner tries to +remember it. + +Fortunately, the bug is not re-introduced as we did add the extra +sorting based on if the visible text contains the query. +--- + lib/sourcesmodel.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/sourcesmodel.cpp b/lib/sourcesmodel.cpp +index cae6f06..06a3715 100644 +--- a/lib/sourcesmodel.cpp ++++ b/lib/sourcesmodel.cpp +@@ -221,8 +221,7 @@ void SourcesModel::slotMatchesChanged(const QList& l) + QSet higherTypes; + for (QString type: m_types) { + const TypeData td = m_matches.value(type); +- if (!td.shown.isEmpty()) { +- const auto& match = td.shown.first(); ++ for (const Plasma::QueryMatch& match : td.shown) { + if (match.text().contains(m_queryString, Qt::CaseInsensitive)) { + QString matchType = match.matchCategory(); + higherTypes << matchType; +-- +2.1.2 + diff --git a/milou5.changes b/milou5.changes index 25d87a2..56f2e00 100644 --- a/milou5.changes +++ b/milou5.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Oct 25 17:39:11 UTC 2014 - hrvoje.senjan@gmail.com + +- Recommend lang subpackage +- Added 0001-ResultsView-Handle-both-Enter-and-Return.patch and + 0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch + from upstream (kde#339628) + ------------------------------------------------------------------- Thu Oct 9 21:24:36 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/milou5.spec b/milou5.spec index 6dc9b33..68ba891 100644 --- a/milou5.spec +++ b/milou5.spec @@ -25,6 +25,10 @@ Group: System/GUI/KDE Url: https://projects.kde.org/milou Source: milou-%{version}.1.tar.xz Source99: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM 0001-ResultsView-Handle-both-Enter-and-Return.patch +Patch0: 0001-ResultsView-Handle-both-Enter-and-Return.patch +# PATCH-FIX-UPSTREAM 0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch +Patch1: 0002-Revert-SourcesModel-Only-consider-each-types-first-r.patch BuildRequires: extra-cmake-modules BuildRequires: fdupes BuildRequires: kdeclarative-devel @@ -37,6 +41,7 @@ BuildRequires: pkgconfig(Qt5Quick) >= 5.2.0 BuildRequires: pkgconfig(Qt5Script) >= 5.2.0 BuildRequires: pkgconfig(Qt5Test) >= 5.2.0 BuildRequires: pkgconfig(Qt5Widgets) >= 5.2.0 +Recommends: %{name}-lang BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -45,6 +50,8 @@ A dedicated search application built on top of Baloo %lang_package %prep %setup -q -n milou-%{version} +%patch0 -p1 +%patch1 -p1 %build %cmake_kf5 -d build -- -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5