Changeset View
Changeset View
Standalone View
Standalone View
tabsrunner/tabsrunner.cpp
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Line(s) | 146 | const QVariantHash tabData = { | |||
---|---|---|---|---|---|
147 | {QStringLiteral("service"), service}, | 147 | {QStringLiteral("service"), service}, | ||
148 | {QStringLiteral("tabId"), tabId}, | 148 | {QStringLiteral("tabId"), tabId}, | ||
149 | {QStringLiteral("audible"), audible}, | 149 | {QStringLiteral("audible"), audible}, | ||
150 | {QStringLiteral("muted"), muted} | 150 | {QStringLiteral("muted"), muted} | ||
151 | }; | 151 | }; | ||
152 | 152 | | |||
153 | Plasma::QueryMatch match(this); | 153 | Plasma::QueryMatch match(this); | ||
154 | match.setText(text); | 154 | match.setText(text); | ||
155 | match.setSubtext(url.toDisplayString()); | ||||
155 | match.setData(tabData); | 156 | match.setData(tabData); | ||
156 | 157 | | |||
157 | qreal relevance = 0; | 158 | qreal relevance = 0; | ||
158 | 159 | | |||
159 | // someone was really busy here, typing the *exact* title or url :D | 160 | // someone was really busy here, typing the *exact* title or url :D | ||
160 | if (text.compare(term, Qt::CaseInsensitive) == 0 || url.toString().compare(term, Qt::CaseInsensitive) == 0) { | 161 | if (text.compare(term, Qt::CaseInsensitive) == 0 || url.toString().compare(term, Qt::CaseInsensitive) == 0) { | ||
161 | match.setType(Plasma::QueryMatch::ExactMatch); | 162 | match.setType(Plasma::QueryMatch::ExactMatch); | ||
162 | relevance = 1; | 163 | relevance = 1; | ||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |