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

Fix install/load plugins from kf<version>

parent eb4a3cb4
Pipeline #188830 passed with stage
in 5 minutes and 11 seconds
......@@ -195,7 +195,7 @@ target_link_libraries(dolphinpart
dolphinprivate
)
install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/parts)
install(TARGETS dolphinpart DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/parts)
##########################################
......
......@@ -122,7 +122,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO
connect(m_directoryContentsCounter, &KDirectoryContentsCounter::result,
this, &KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived);
const auto plugins = KPluginMetaData::findPlugins(QStringLiteral("kf5/overlayicon"));
const auto plugins = KPluginMetaData::findPlugins(QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/overlayicon"));
for (const KPluginMetaData &data : plugins) {
auto instance = QPluginLoader(data.fileName()).instance();
auto plugin = qobject_cast<KOverlayIconPlugin *>(instance);
......
......@@ -317,7 +317,7 @@ void ContextMenuSettingsPage::loadServices()
#endif
// Load JSON-based plugins that implement the KFileItemActionPlugin interface
const auto jsonPlugins = KPluginMetaData::findPlugins(QStringLiteral("kf5/kfileitemaction"));
const auto jsonPlugins = KPluginMetaData::findPlugins(QStringLiteral("kf" QT_STRINGIFY(QT_VERSION_MAJOR)) + QStringLiteral("/kfileitemaction"));
for (const auto &jsonMetadata : jsonPlugins) {
const QString desktopEntryName = jsonMetadata.pluginId();
......
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