Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/actionlist.cpp
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Line(s) | 224 | { | |||
---|---|---|---|---|---|
236 | 236 | | |||
237 | auto query = UsedResources | 237 | auto query = UsedResources | ||
238 | | RecentlyUsedFirst | 238 | | RecentlyUsedFirst | ||
239 | | Agent(storageId) | 239 | | Agent(storageId) | ||
240 | | Type::any() | 240 | | Type::any() | ||
241 | | Activity::current() | 241 | | Activity::current() | ||
242 | | Url::file(); | 242 | | Url::file(); | ||
243 | 243 | | |||
244 | // Due to KRecentDocument::add() bug, application name "<app>" could | | |||
245 | // be stored instead of its desktop entry name "org.kde.<app>". Let's | | |||
246 | // check for both in order to get all results for the application. | | |||
247 | if (storageId.startsWith("org.kde.")) { | | |||
248 | query = query | Agent(storageId.mid(8)); | | |||
249 | } | | |||
250 | | ||||
251 | ResultSet results(query); | 244 | ResultSet results(query); | ||
252 | 245 | | |||
253 | ResultSet::const_iterator resultIt; | 246 | ResultSet::const_iterator resultIt; | ||
254 | resultIt = results.begin(); | 247 | resultIt = results.begin(); | ||
255 | 248 | | |||
256 | while (list.count() < 6 && resultIt != results.end()) { | 249 | while (list.count() < 6 && resultIt != results.end()) { | ||
257 | const QString resource = (*resultIt).resource(); | 250 | const QString resource = (*resultIt).resource(); | ||
258 | const QUrl url(resource); | 251 | const QUrl url(resource); | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 288 | if (actionId == "_kicker_forgetRecentDocuments") { | |||
300 | } | 293 | } | ||
301 | 294 | | |||
302 | auto query = UsedResources | 295 | auto query = UsedResources | ||
303 | | Agent(storageId) | 296 | | Agent(storageId) | ||
304 | | Type::any() | 297 | | Type::any() | ||
305 | | Activity::current() | 298 | | Activity::current() | ||
306 | | Url::file(); | 299 | | Url::file(); | ||
307 | 300 | | |||
308 | // Due to KRecentDocument::add() bug, application name "<app>" could | | |||
309 | // be stored instead of its desktop entry name "org.kde.<app>". Let's | | |||
310 | // check for both in order to get all results for the application. | | |||
311 | if (storageId.startsWith("org.kde.")) { | | |||
312 | query = query | Agent(storageId.mid(8)); | | |||
313 | } | | |||
314 | | ||||
315 | KAStats::forgetResources(query); | 301 | KAStats::forgetResources(query); | ||
316 | 302 | | |||
317 | return false; | 303 | return false; | ||
318 | } | 304 | } | ||
319 | 305 | | |||
320 | QString argument = _argument.toString(); | 306 | QString argument = _argument.toString(); | ||
321 | 307 | | |||
322 | if (argument.isEmpty()) { | 308 | if (argument.isEmpty()) { | ||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |