forked from qt-creator/qt-creator
Show more useful error dialog in case of plugin errors.
Task-number: QTCREATORBUG-3940 Change-Id: I9e12ad68bba9c2f0d8f5243ab7dc763765fba756 Reviewed-on: http://codereview.qt.nokia.com/3811 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
@@ -328,6 +328,22 @@ void PluginManager::loadPlugins()
|
||||
return d->loadPlugins();
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn bool PluginManager::hasError() const
|
||||
Returns true if any plugin has errors even though it is enabled.
|
||||
Most useful to call after loadPlugins().
|
||||
*/
|
||||
bool PluginManager::hasError() const
|
||||
{
|
||||
foreach (PluginSpec *spec, plugins()) {
|
||||
// only show errors on startup if plugin is enabled.
|
||||
if (spec->hasError() && spec->isEnabled() && !spec->isDisabledIndirectly()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void PluginManager::shutdown()
|
||||
Shuts down and deletes all plugins.
|
||||
|
||||
Reference in New Issue
Block a user