PluginSpec: Naming and encapsulation improvements

Prefer enabled state as a property as opposed to disabled state, and
make setter correspond to getter. Also move setters into private.

Change-Id: I5d002a12f4e540d5b38cc5865490d056ec75f296
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-03-31 09:55:50 +02:00
parent fcc6b11230
commit d456fd0b8a
7 changed files with 72 additions and 64 deletions

View File

@@ -48,7 +48,7 @@ PluginErrorOverview::PluginErrorOverview(QWidget *parent) :
foreach (PluginSpec *spec, PluginManager::plugins()) {
// only show errors on startup if plugin is enabled.
if (spec->hasError() && spec->isEnabledInSettings() && !spec->isDisabledIndirectly()) {
if (spec->hasError() && spec->isEnabledBySettings() && !spec->isDisabledIndirectly()) {
QListWidgetItem *item = new QListWidgetItem(spec->name());
item->setData(Qt::UserRole, qVariantFromValue(spec));
m_ui->pluginList->addItem(item);