X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fdialogs%2FDomainSettingsDialog.cpp;fp=src%2Fdialogs%2FDomainSettingsDialog.cpp;h=6964d37532209b39871968b5cdaaba863d788598;hp=ea5558c1fd267491dd8bfd3617bff89642611b86;hb=310828788817f6acf54c77138ec38d97c8bdaf3d;hpb=b4c8c8d02113d14c2a07751eb3b0c1bdeec7abb4 diff --git a/src/dialogs/DomainSettingsDialog.cpp b/src/dialogs/DomainSettingsDialog.cpp index ea5558c..6964d37 100644 --- a/src/dialogs/DomainSettingsDialog.cpp +++ b/src/dialogs/DomainSettingsDialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright © 2022 Soren Stoutner . + * Copyright 2022-2023 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -219,13 +219,13 @@ void DomainSettingsDialog::apply() const QModelIndex currentIndex = domainsListViewPointer->currentIndex(); // Get the ID of the current index row. - QVariant currentId = currentIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::_ID)).data(); + QVariant currentId = currentIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::ID)).data(); // Submit all pending changes. domainsTableModelPointer->submitAll(); // Find the new index for the selected id. The `1` keeps searching after the first match. - QModelIndexList newIndexList = domainsTableModelPointer->match(currentIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::_ID)), Qt::DisplayRole, currentId, + QModelIndexList newIndexList = domainsTableModelPointer->match(currentIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::ID)), Qt::DisplayRole, currentId, 1, Qt::MatchWrap); // Select the new index. @@ -389,10 +389,10 @@ void DomainSettingsDialog::populateDomStorageLabel() const break; } - case (DomainsDatabase::DISABLED): + case (DomainsDatabase::ENABLED): { - // Set the disabled text in bold. - domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label. The tags should be retained.", "DOM storage disabled")); + // Set the enabled text in bold. + domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label. The tags should be retained.", "DOM storage enabled")); // Set the palette. domStorageWidgetPointer->setPalette(highlightedPalette); @@ -400,10 +400,10 @@ void DomainSettingsDialog::populateDomStorageLabel() const break; } - case (DomainsDatabase::ENABLED): + case (DomainsDatabase::DISABLED): { - // Set the enabled text in bold. - domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label. The tags should be retained.", "DOM storage enabled")); + // Set the disabled text in bold. + domStorageLabelPointer->setText(i18nc("Domain settings DOM storage label. The tags should be retained.", "DOM storage disabled")); // Set the palette. domStorageWidgetPointer->setPalette(highlightedPalette); @@ -432,10 +432,10 @@ void DomainSettingsDialog::populateJavaScriptLabel() const break; } - case (DomainsDatabase::DISABLED): + case (DomainsDatabase::ENABLED): { - // Set the disabled text in bold. - javaScriptLabelPointer->setText(i18nc("Domain settings JavaScript label. The tags should be retained.", "JavaScript disabled")); + // Set the enabled text in bold. + javaScriptLabelPointer->setText(i18nc("Domain settings JavaScript label. The tags should be retained.", "JavaScript enabled")); // Set the palette. javaScriptWidgetPointer->setPalette(highlightedPalette); @@ -443,10 +443,10 @@ void DomainSettingsDialog::populateJavaScriptLabel() const break; } - case (DomainsDatabase::ENABLED): + case (DomainsDatabase::DISABLED): { - // Set the enabled text in bold. - javaScriptLabelPointer->setText(i18nc("Domain settings JavaScript label. The tags should be retained.", "JavaScript enabled")); + // Set the disabled text in bold. + javaScriptLabelPointer->setText(i18nc("Domain settings JavaScript label. The tags should be retained.", "JavaScript disabled")); // Set the palette. javaScriptWidgetPointer->setPalette(highlightedPalette); @@ -475,10 +475,10 @@ void DomainSettingsDialog::populateLocalStorageLabel() const break; } - case (DomainsDatabase::DISABLED): + case (DomainsDatabase::ENABLED): { - // Set the disabled text in bold. - localStorageLabelPointer->setText(i18nc("Domain settings local storage label. The tags should be retained.", "Local storage disabled")); + // Set the enabled text in bold. + localStorageLabelPointer->setText(i18nc("Domain settings local storage label. The tabs should be retained.", "Local storage enabled")); // Set the palette. localStorageWidgetPointer->setPalette(highlightedPalette); @@ -486,10 +486,10 @@ void DomainSettingsDialog::populateLocalStorageLabel() const break; } - case (DomainsDatabase::ENABLED): + case (DomainsDatabase::DISABLED): { - // Set the enabled text in bold. - localStorageLabelPointer->setText(i18nc("Domain settings local storage label. The tabs should be retained.", "Local storage enabled")); + // Set the disabled text in bold. + localStorageLabelPointer->setText(i18nc("Domain settings local storage label. The tags should be retained.", "Local storage disabled")); // Set the palette. localStorageWidgetPointer->setPalette(highlightedPalette);