mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Fix plugin query
QT_MAJOR_VERSION is undefined, the proper thing is QT_VERSION_MAJOR This causes the plugin query to not find any plugins Since we only target KF6 we might as well hardcode that
This commit is contained in:
parent
f60628cdfa
commit
88ebcd42db
|
@ -119,8 +119,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel *model, QO
|
|||
m_directoryContentsCounter = new KDirectoryContentsCounter(m_model, this);
|
||||
connect(m_directoryContentsCounter, &KDirectoryContentsCounter::result, this, &KFileItemModelRolesUpdater::slotDirectoryContentsCountReceived);
|
||||
|
||||
const QString pluginNamespace = QStringLiteral("kf" QT_STRINGIFY(QT_MAJOR_VERSION)) + QStringLiteral("/overlayicon");
|
||||
const auto plugins = KPluginMetaData::findPlugins(pluginNamespace, {}, KPluginMetaData::AllowEmptyMetaData);
|
||||
const auto plugins = KPluginMetaData::findPlugins(QStringLiteral("kf6/overlayicon"), {}, KPluginMetaData::AllowEmptyMetaData);
|
||||
for (const KPluginMetaData &data : plugins) {
|
||||
auto instance = QPluginLoader(data.fileName()).instance();
|
||||
auto plugin = qobject_cast<KOverlayIconPlugin *>(instance);
|
||||
|
|
|
@ -307,7 +307,7 @@ void ContextMenuSettingsPage::loadServices()
|
|||
}
|
||||
|
||||
// Load JSON-based plugins that implement the KFileItemActionPlugin interface
|
||||
const auto jsonPlugins = KPluginMetaData::findPlugins(QStringLiteral("kf" QT_STRINGIFY(QT_MAJOR_VERSION)) + QStringLiteral("/kfileitemaction"));
|
||||
const auto jsonPlugins = KPluginMetaData::findPlugins(QStringLiteral("kf6/kfileitemaction"));
|
||||
|
||||
for (const auto &jsonMetadata : jsonPlugins) {
|
||||
const QString desktopEntryName = jsonMetadata.pluginId();
|
||||
|
|
Loading…
Reference in a new issue