Commit 0c8e5636 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Tabs Runner: Use KApplicationTrader::isSubsequence

Makes finding tabs more clever, e.g. when typing "rfc somehing" it
would find a tab named "RFC: Add something somewhere"
parent aee0f2e8
......@@ -32,6 +32,7 @@
#include <QJsonObject>
#include <QVariant>
#include <KApplicationTrader>
#include <KLocalizedString>
#include "settings.h"
......@@ -143,7 +144,7 @@ void TabsRunnerPlugin::handleData(const QString& event, const QJsonObject& json)
} else {
match.type = Plasma::QueryMatch::PossibleMatch;
if (text.contains(query, Qt::CaseInsensitive)) {
if (KApplicationTrader::isSubsequence(query, text, Qt::CaseInsensitive)) {
relevance = 0.9;
if (text.startsWith(query, Qt::CaseInsensitive)) {
relevance += 0.1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment