Commit 16392876 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use kontact<version>

parent b0e65dd6
Pipeline #184039 passed with stage
in 4 minutes and 46 seconds
......@@ -61,9 +61,10 @@ KcmKontact::KcmKontact(QWidget *parent, const QVariantList &args)
void KcmKontact::load()
{
const KConfigGroup grp(Prefs::self()->config(), "Plugins");
const QVector<KPluginMetaData> pluginMetaDatas = KPluginMetaData::findPlugins(QStringLiteral("kontact5"), [](const KPluginMetaData &data) {
return data.rawData().value(QStringLiteral("X-KDE-KontactPluginVersion")).toInt() == KONTACT_PLUGIN_VERSION;
});
const QVector<KPluginMetaData> pluginMetaDatas =
KPluginMetaData::findPlugins(QStringLiteral("kontact" QT_STRINGIFY(QT_VERSION_MAJOR)), [](const KPluginMetaData &data) {
return data.rawData().value(QStringLiteral("X-KDE-KontactPluginVersion")).toInt() == KONTACT_PLUGIN_VERSION;
});
int activeComponent = 0;
mPluginCombo->clear();
......
......@@ -70,9 +70,10 @@ private:
static void listPlugins()
{
const QVector<KPluginMetaData> pluginMetaDatas = KPluginMetaData::findPlugins(QStringLiteral("kontact5"), [](const KPluginMetaData &data) {
return data.rawData().value(QStringLiteral("X-KDE-KontactPluginVersion")).toInt() == KONTACT_PLUGIN_VERSION;
});
const QVector<KPluginMetaData> pluginMetaDatas =
KPluginMetaData::findPlugins(QStringLiteral("kontact" QT_STRINGIFY(QT_VERSION_MAJOR)), [](const KPluginMetaData &data) {
return data.rawData().value(QStringLiteral("X-KDE-KontactPluginVersion")).toInt() == KONTACT_PLUGIN_VERSION;
});
for (const KPluginMetaData &plugin : pluginMetaDatas) {
// skip summary only plugins
......
......@@ -133,7 +133,7 @@ void MainWindow::initObject()
qFatal("KSycoca unavailable. Kontact will be unable to find plugins.");
}
}
mPluginMetaData = KPluginMetaData::findPlugins(QStringLiteral("kontact5"), [](const KPluginMetaData &data) {
mPluginMetaData = KPluginMetaData::findPlugins(QStringLiteral("kontact" QT_STRINGIFY(QT_VERSION_MAJOR)), [](const KPluginMetaData &data) {
return data.rawData().value(QStringLiteral("X-KDE-KontactPluginVersion")).toInt() == KONTACT_PLUGIN_VERSION;
});
......
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