Rename is_enabled to enabled
This commit is contained in:
@@ -98,7 +98,7 @@ void AlbumCoverFetcherSearch::Start(SharedPtr<CoverProviders> cover_providers) {
|
|||||||
|
|
||||||
for (CoverProvider *provider : std::as_const(cover_providers_sorted)) {
|
for (CoverProvider *provider : std::as_const(cover_providers_sorted)) {
|
||||||
|
|
||||||
if (!provider->is_enabled()) continue;
|
if (!provider->enabled()) continue;
|
||||||
|
|
||||||
// Skip any provider that requires authentication but is not authenticated.
|
// Skip any provider that requires authentication but is not authenticated.
|
||||||
if (provider->authentication_required() && !provider->authenticated()) {
|
if (provider->authentication_required() && !provider->authenticated()) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class CoverProvider : public JsonBaseRequest {
|
|||||||
explicit CoverProvider(const QString &name, const bool enabled, const bool authentication_required, const float quality, const bool batch, const bool allow_missing_album, const SharedPtr<NetworkAccessManager> network, QObject *parent);
|
explicit CoverProvider(const QString &name, const bool enabled, const bool authentication_required, const float quality, const bool batch, const bool allow_missing_album, const SharedPtr<NetworkAccessManager> network, QObject *parent);
|
||||||
|
|
||||||
QString name() const { return name_; }
|
QString name() const { return name_; }
|
||||||
bool is_enabled() const { return enabled_; }
|
bool enabled() const { return enabled_; }
|
||||||
int order() const { return order_; }
|
int order() const { return order_; }
|
||||||
float quality() const { return quality_; }
|
float quality() const { return quality_; }
|
||||||
bool batch() const { return batch_; }
|
bool batch() const { return batch_; }
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void CoverProviders::ReloadSettings() {
|
|||||||
QMap<int, QString> all_providers;
|
QMap<int, QString> all_providers;
|
||||||
QList<CoverProvider*> old_providers = cover_providers_.keys();
|
QList<CoverProvider*> old_providers = cover_providers_.keys();
|
||||||
for (CoverProvider *provider : std::as_const(old_providers)) {
|
for (CoverProvider *provider : std::as_const(old_providers)) {
|
||||||
if (!provider->is_enabled()) continue;
|
if (!provider->enabled()) continue;
|
||||||
all_providers.insert(provider->order(), provider->name());
|
all_providers.insert(provider->order(), provider->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,8 @@ void CoversSettingsPage::Load() {
|
|||||||
for (CoverProvider *provider : std::as_const(cover_providers_sorted)) {
|
for (CoverProvider *provider : std::as_const(cover_providers_sorted)) {
|
||||||
QListWidgetItem *item = new QListWidgetItem(ui_->providers);
|
QListWidgetItem *item = new QListWidgetItem(ui_->providers);
|
||||||
item->setText(provider->name());
|
item->setText(provider->name());
|
||||||
item->setCheckState(provider->is_enabled() ? Qt::Checked : Qt::Unchecked);
|
item->setCheckState(provider->enabled() ? Qt::Checked : Qt::Unchecked);
|
||||||
item->setForeground(provider->is_enabled() ? palette().color(QPalette::Active, QPalette::Text) : palette().color(QPalette::Disabled, QPalette::Text));
|
item->setForeground(provider->enabled() ? palette().color(QPalette::Active, QPalette::Text) : palette().color(QPalette::Disabled, QPalette::Text));
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings s;
|
Settings s;
|
||||||
|
|||||||
Reference in New Issue
Block a user