From 962f21e41e1d47bfa937a80dc14fa9f805ff21f186454cc357983d05081899c9 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 22 Feb 2021 13:58:38 +0000 Subject: [PATCH] Accepting request 874340 from home:Vogtinator:plasma5.21 - Add patch to avoid empty queries, which causes runners to misbehave: * 0001-Fix-launching-empty-query.patch OBS-URL: https://build.opensuse.org/request/show/874340 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/milou5?expand=0&rev=278 --- 0001-Fix-launching-empty-query.patch | 27 +++++++++++++++++++++++++++ milou5.changes | 6 ++++++ milou5.spec | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 0001-Fix-launching-empty-query.patch diff --git a/0001-Fix-launching-empty-query.patch b/0001-Fix-launching-empty-query.patch new file mode 100644 index 0000000..9b95e5d --- /dev/null +++ b/0001-Fix-launching-empty-query.patch @@ -0,0 +1,27 @@ +From df4a62c3d79129be7ae716455f9afb07eeace3c8 Mon Sep 17 00:00:00 2001 +From: Alexander Lohnau +Date: Mon, 22 Feb 2021 14:36:46 +0100 +Subject: [PATCH] Fix launching empty query + +If the query is prefixed with a space the launched entry should not be +added to the history, in case there is nothing after the query the trimmed string would be empty. +--- + lib/runnerresultsmodel.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/runnerresultsmodel.cpp b/lib/runnerresultsmodel.cpp +index df7ebc9..eb4b9ee 100644 +--- a/lib/runnerresultsmodel.cpp ++++ b/lib/runnerresultsmodel.cpp +@@ -191,7 +191,7 @@ void RunnerResultsModel::setQueryString(const QString &queryString) + m_hasMatches = false; + if (queryString.isEmpty()) { + clear(); +- } else { ++ } else if (!queryString.trimmed().isEmpty()) { + m_resetTimer.start(); + m_manager->launchQuery(queryString, m_runner); + setQuerying(true); +-- +2.25.1 + diff --git a/milou5.changes b/milou5.changes index a3ec329..b1ef7e3 100644 --- a/milou5.changes +++ b/milou5.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 22 13:42:25 UTC 2021 - Fabian Vogt + +- Add patch to avoid empty queries, which causes runners to misbehave: + * 0001-Fix-launching-empty-query.patch + ------------------------------------------------------------------- Thu Feb 11 18:23:13 UTC 2021 - Fabian Vogt diff --git a/milou5.spec b/milou5.spec index 9a71926..7ad4ae2 100644 --- a/milou5.spec +++ b/milou5.spec @@ -29,6 +29,8 @@ Source: milou-%{version}.tar.xz Source1: milou-%{version}.tar.xz.sig Source2: plasma.keyring %endif +# PATCH-FIX-UPSTREAM +Patch1: 0001-Fix-launching-empty-query.patch BuildRequires: extra-cmake-modules >= 1.2.0 BuildRequires: fdupes BuildRequires: kf5-filesystem