Commit 2acf92c8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 458202: Search for messages in kmail does not work anymore... no results at all

FIXED-IN: 5.21.1
BUG: 458202
BUG: 458245
parent 0c78a5e9
Pipeline #229044 skipped
......@@ -135,11 +135,12 @@ void SearchManager::loadSearchPlugins()
const QStringList dirs = QCoreApplication::libraryPaths();
for (const QString &pluginDir : dirs) {
QDir dir(pluginDir + QLatin1String("/akonadi"));
const QString path(pluginDir + QStringLiteral("/pim" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/akonadi"));
QDir dir(path);
const QStringList fileNames = dir.entryList(QDir::Files);
qCDebug(AKONADISERVER_SEARCH_LOG) << "SEARCH MANAGER: searching in " << pluginDir + QLatin1String("/akonadi") << ":" << fileNames;
qCDebug(AKONADISERVER_SEARCH_LOG) << "SEARCH MANAGER: searching in " << path << ":" << fileNames;
for (const QString &fileName : fileNames) {
const QString filePath = pluginDir % QLatin1String("/akonadi/") % fileName;
const QString filePath = path % QLatin1Char('/') % fileName;
std::unique_ptr<QPluginLoader> loader(new QPluginLoader(filePath));
const QVariantMap metadata = loader->metaData().value(QStringLiteral("MetaData")).toVariant().toMap();
if (metadata.value(QStringLiteral("X-Akonadi-PluginType")).toString() != QLatin1String("SearchPlugin")) {
......
Supports Markdown
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