From 084d5276383cdfc879bba013a1ed2db19848813d Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Thu, 16 Jul 2015 19:13:44 +0530 Subject: [PATCH] Print useful warning when we can not get valid KPluginInfo We can not generate proper PluginInfo most likely because metadata was not valid, printing metadata itself will not be useful and will result in printing message like, Could not load plugin info for plugin : "" skipping plugin Which is 0% useful. --- src/plasma/pluginloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plasma/pluginloader.cpp b/src/plasma/pluginloader.cpp index 62ff628b6..f01341a87 100644 --- a/src/plasma/pluginloader.cpp +++ b/src/plasma/pluginloader.cpp @@ -574,7 +574,7 @@ KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QS for (auto md : KPackage::PackageLoader::self()->findPackages("Plasma/Applet", QString(), filter)) { auto pi = KPluginInfo(KService::serviceByStorageId(md.metaDataFileName())); if (!pi.isValid()) { - qWarning() << "Could not load plugin info:" << md.metaDataFileName() << "skipping plugin"; + qWarning() << "Could not load plugin info for plugin :" << md.pluginId() << "skipping plugin"; continue; } list << pi; @@ -600,7 +600,7 @@ KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QS for (auto md : KPackage::PackageLoader::self()->findPackages("Plasma/Applet", QString(), filter)) { auto pi = KPluginInfo(KService::serviceByStorageId(md.metaDataFileName())); if (!pi.isValid()) { - qWarning() << "Could not load plugin info:" << md.metaDataFileName() << "skipping plugin"; + qWarning() << "Could not load plugin info for plugin :" << md.pluginId() << "skipping plugin"; continue; } list << pi;