Use correct syntax for tag filters in KNS backend

Previously we just accepted all entries, irrelevant of what binary
format the application would be available in. Now filtering is
performed correctly. Sorry about that.
parent 51979e28
......@@ -183,16 +183,16 @@ KNSBackend::KNSBackend(QObject* parent, const QString& iconName, const QString &
// Make sure we filter out any apps which won't run on the current system architecture
QStringList tagFilter = m_engine->tagFilter();
if(QSysInfo::currentCpuArchitecture() == QLatin1String("arm")) {
tagFilter << QLatin1String("application##architecture=armhf");
tagFilter << QLatin1String("application##architecture==armhf");
} else if(QSysInfo::currentCpuArchitecture() == QLatin1String("arm64")) {
tagFilter << QLatin1String("application##architecture=arm64");
tagFilter << QLatin1String("application##architecture==arm64");
} else if(QSysInfo::currentCpuArchitecture() == QLatin1String("i386")) {
tagFilter << QLatin1String("application##architecture=x86");
tagFilter << QLatin1String("application##architecture==x86");
} else if(QSysInfo::currentCpuArchitecture() == QLatin1String("ia64")) {
tagFilter << QLatin1String("application##architecture=x86-64");
tagFilter << QLatin1String("application##architecture==x86-64");
} else if(QSysInfo::currentCpuArchitecture() == QLatin1String("x86_64")) {
tagFilter << QLatin1String("application##architecture=x86");
tagFilter << QLatin1String("application##architecture=x86-64");
tagFilter << QLatin1String("application##architecture==x86");
tagFilter << QLatin1String("application##architecture==x86-64");
}
m_engine->setTagFilter(tagFilter);
} else {
......
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