Changeset View
Changeset View
Standalone View
Standalone View
libdiscover/backends/KNSBackend/KNSBackend.cpp
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | 149 | if (cats.count() > 1) { | |||
---|---|---|---|---|---|
151 | for(const auto &cat: cats) | 151 | for(const auto &cat: cats) | ||
152 | categories << new Category(cat, {}, { {CategoryFilter, cat } }, backendName, {}, {}, true); | 152 | categories << new Category(cat, {}, { {CategoryFilter, cat } }, backendName, {}, {}, true); | ||
153 | } | 153 | } | ||
154 | static const QString knsrcApplications = QLatin1String("storekdeapps.knsrc"); | 154 | static const QString knsrcApplications = QLatin1String("storekdeapps.knsrc"); | ||
155 | 155 | | |||
156 | if(knsrcApplications == fileName) { | 156 | if(knsrcApplications == fileName) { | ||
157 | m_hasApplications = true; | 157 | m_hasApplications = true; | ||
158 | auto actualCategory = new Category(m_displayName, QStringLiteral("plasma"), filters, backendName, categories, QUrl(), false); | 158 | auto actualCategory = new Category(m_displayName, QStringLiteral("plasma"), filters, backendName, categories, QUrl(), false); | ||
159 | auto applicationCategory = new Category(i18n("Applications"), QStringLiteral("plasma"), filters, backendName, { actualCategory }, QUrl(), false); | 159 | auto applicationCategory = new Category(i18n("Applications"), QStringLiteral("applications-internet"), filters, backendName, { actualCategory }, QUrl(), false); | ||
160 | applicationCategory->setAndFilter({ {CategoryFilter, QLatin1String("Application")} }); | ||||
160 | m_categories.append(applicationCategory->name()); | 161 | m_categories.append(applicationCategory->name()); | ||
161 | m_rootCategories = { applicationCategory }; | 162 | m_rootCategories = { applicationCategory }; | ||
162 | // Make sure we filter out any apps which won't run on the current system architecture | 163 | // Make sure we filter out any apps which won't run on the current system architecture | ||
163 | QStringList tagFilter = m_engine->tagFilter(); | 164 | QStringList tagFilter = m_engine->tagFilter(); | ||
164 | if(QSysInfo::currentCpuArchitecture() == QLatin1String("arm")) { | 165 | if(QSysInfo::currentCpuArchitecture() == QLatin1String("arm")) { | ||
165 | tagFilter << QLatin1String("application##architecture=armhf"); | 166 | tagFilter << QLatin1String("application##architecture=armhf"); | ||
166 | } else if(QSysInfo::currentCpuArchitecture() == QLatin1String("arm64")) { | 167 | } else if(QSysInfo::currentCpuArchitecture() == QLatin1String("arm64")) { | ||
167 | tagFilter << QLatin1String("application##architecture=arm64"); | 168 | tagFilter << QLatin1String("application##architecture=arm64"); | ||
▲ Show 20 Lines • Show All 396 Lines • Show Last 20 Lines |