Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/backends/KNSBackend/KNSBackend.cpp
Show First 20 Lines • Show All 498 Lines • ▼ Show 20 Line(s) | 487 | } else if (filter.state >= AbstractResource::Installed) { | |||
---|---|---|---|---|---|
499 | }; | 499 | }; | ||
500 | if (isFetching()) { | 500 | if (isFetching()) { | ||
501 | connect(this, &KNSBackend::initialized, stream, start); | 501 | connect(this, &KNSBackend::initialized, stream, start); | ||
502 | } else { | 502 | } else { | ||
503 | QTimer::singleShot(0, stream, start); | 503 | QTimer::singleShot(0, stream, start); | ||
504 | } | 504 | } | ||
505 | 505 | | |||
506 | return stream; | 506 | return stream; | ||
507 | } else if ((m_hasApplications && !filter.category) // If there is no category defined, we are searching in the root, and should include only application results | 507 | } else if ((!filter.category && !filter.search.isEmpty()) // Accept global searches | ||
apol: The comment should be `//Accept global searches`, the featured page queries by URL. | |||||
508 | // If there /is/ a category, make sure we actually are one of those requested before searching | 508 | // If there /is/ a category, make sure we actually are one of those requested before searching | ||
509 | || (filter.category && kContains(m_categories, [&filter](const QString& cat) { return filter.category->matchesCategoryName(cat); }))) { | 509 | || (filter.category && kContains(m_categories, [&filter](const QString& cat) { return filter.category->matchesCategoryName(cat); }))) { | ||
510 | auto r = new ResultsStream(QLatin1String("KNS-search-")+name()); | 510 | auto r = new ResultsStream(QLatin1String("KNS-search-")+name()); | ||
511 | searchStream(r, filter.search); | 511 | searchStream(r, filter.search); | ||
512 | return r; | 512 | return r; | ||
513 | } | 513 | } | ||
514 | return voidStream(); | 514 | return voidStream(); | ||
515 | } | 515 | } | ||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |
The comment should be //Accept global searches, the featured page queries by URL.