[kdevplatform/1.6] shell: Don't show a message box when a plugin couldn't be loaded

Aleix Pol aleixpol at kde.org
Wed Nov 6 01:38:09 UTC 2013


Git commit e6c293cffb7fbc885e743ba758f6bc5399e51ba7 by Aleix Pol.
Committed on 06/11/2013 at 01:35.
Pushed by apol into branch '1.6'.

Don't show a message box when a plugin couldn't be loaded

IPlugin has a hasError method that is used to check if the plugin could
initialize itself. It's used to make sure that the runtime dependencies
are met, such as checking that git, cmake and ninja are installed.

Having a message box for those is too intrusive, given that if the user
needs the tool and doesn't have them installed, he'll have a bigger
problem than not having the plugin in KDevelop. Instead, a kWarning() is
provided, so we can tell our users to check the console output if one of
these problems happen.

CCMAIL: kdevelop-devel at kde.org

M  +1    -1    shell/plugincontroller.cpp

http://commits.kde.org/kdevplatform/e6c293cffb7fbc885e743ba758f6bc5399e51ba7

diff --git a/shell/plugincontroller.cpp b/shell/plugincontroller.cpp
index 7ac32fa..0698646 100644
--- a/shell/plugincontroller.cpp
+++ b/shell/plugincontroller.cpp
@@ -436,7 +436,7 @@ IPlugin *PluginController::loadPluginInternal( const QString &pluginId )
     if ( plugin )
     {
         if ( plugin->hasError() ) {
-            KMessageBox::error(0, i18n("Plugin '%1' could not be loaded correctly and was disabled.\nReason: %2.", info.name(), plugin->errorDescription()));
+            kWarning() << i18n("Plugin '%1' could not be loaded correctly and was disabled.\nReason: %2.", info.name(), plugin->errorDescription());
             info.setPluginEnabled(false);
             info.save(Core::self()->activeSession()->config()->group(pluginControllerGrp));
             unloadPlugin(pluginId);


More information about the KDevelop-devel mailing list