https://bugs.kde.org/show_bug.cgi?id=459830
Bug ID: 459830 Summary: Anomaly: KPluginMetaData(file) uses different search path to KPluginMetaData::findPlugins() Classification: Frameworks and Libraries Product: frameworks-kcoreaddons Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: mp...@kde.org Reporter: j...@keelhaul.me.uk CC: kdelibs-b...@kde.org Target Milestone: --- SUMMARY KPluginMetaData::findPlugins() uses KPluginMetaDataPrivate::forEachPlugin() which prepends QCoreApplication::applicationDirPath() to the standard list of directories searched for plugins, QCoreApplication::libraryPaths(). This is obviously intended to support running uninstalled as described in https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled and works. The built but uninstalled plugins are given priority over installed plugins. However, if a plugin is to be loaded using KPluginMetaData(const QString &file) with a relative file name, then the search path is not adjusted as above but the 'file' parameter is simply passed to QPluginLoader which uses QCoreApplication::libraryPaths() unchanged. The effect of this is that KPluginMetaData::findPlugins() may return a plugin name which was found in the application build location, but KPluginMetaData(file), unless the 'file' is given as an absolute path, may either be unable to find the plugin (if it is not system installed) or load a different one (if it is system installed but out of date). ADDITIONAL INFORMATION Suggest that KPluginMetaData, when both listing and loading plugins, should use the same modified search path. The simplest solution would be to modify QCoreApplication::libraryPaths() either at startup or temporarily, to prepend the application directory. -- You are receiving this mail because: You are watching all bug changes.