Since https://git.reviewboard.kde.org/r/119038/ KCMs (sh|c)ould drop their plugin into the kcms/ subdirectory of $QT_PLUGIN_PATH. When kcmshell/kcmutil tries to load one of those, KPluginLoader logs the following lines: default unknown: Error loading plugin "kcm_lookandfeel" "The shared library was not found." Plugin search paths are ("/usr/lib64/qt5/plugins", "/usr/bin") The environment variable QT_PLUGIN_PATH might be not correctly set Loading the KCM still succeeds, so it looks to me, like the error messages shouldn't be shown in that case, but I miss the insight into kpluginloader to fully understand the situation. How to reproduce: - kcmshell5 kcm_lookandfeel Running KF5/Plasma 5 from git + Qt 5.4.1
I've same issue on Arch Linux with Qt 5.5 and all KF5 latest from git master branch (even plasma-desktop, etc.). It happens for all kcms, but seems like everything is working, only this systemsettings5[6563]: Error loading plugin "kcm_lookandfeel" "The shared library was not found." Plugin search paths are ("/usr/lib/qt/plugins", "/usr/bin") The environment variable QT_PLUGIN_PATH might be not correctly set QT_PLUGIN_PATH is empty and kcm_lookandfeel is located at /usr/lib/qt/plugins/kcms/
I've reproduced the message but I think it's better reported against frameworks-kcmutils. I'm not real eager to disable a global warning to make KCMs less noisy, and the following patch to kcmutils allows it to load new KCMs without a warning (by using KPluginLoader::findPlugin to check which name is most appropriate). However I'm not entirely sure there's no other issues so I don't want to commit myself. diff --git a/src/kcmoduleloader.cpp b/src/kcmoduleloader.cpp index 4090ac1..533e892 100644 --- a/src/kcmoduleloader.cpp +++ b/src/kcmoduleloader.cpp @@ -89,22 +89,22 @@ KCModule *KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep foreach (const QString &arg, args) { args2 << arg; } - KCModule *module = mod.service()->createInstance<KCModule>(parent, args2, &error); - if (module) { - return module; + + QString pluginName (mod.service()->library()); + if (KPluginLoader::findPlugin(pluginName).isEmpty()) { + pluginName.prepend(QLatin1String("kcms/")); + } + + KPluginLoader loader(KPluginLoader::findPlugin(pluginName)); + KPluginFactory* factory = loader.factory(); + if (!factory) { + qWarning() << "Error loading plugin:" << loader.errorString(); } else { - KPluginLoader loader(KPluginLoader::findPlugin(QLatin1String("kcms/") + mod.service()->library())); - KPluginFactory* factory = loader.factory(); - if (!factory) { - qWarning() << "Error loading plugin:" << loader.errorString(); - } else { - KQuickAddons::ConfigModule *cm = factory->create<KQuickAddons::ConfigModule >(); - if (!cm) { - qWarning() << "Error creating object from plugin" << loader.fileName(); - } - module = new KCModuleQml(cm, parent, args2); - return module; + KQuickAddons::ConfigModule *cm = factory->create<KQuickAddons::ConfigModule >(); + if (!cm) { + qWarning() << "Error creating object from plugin" << loader.fileName(); } + return new KCModuleQml(cm, parent, args2); } //#ifndef NDEBUG {
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.