X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fdialogs%2FDomainSettingsDialog.cpp;h=ea5558c1fd267491dd8bfd3617bff89642611b86;hp=34ff70e592bf988a8bdc3eb8d69f617361983ad7;hb=06a69a2d38bf73c0c5219f94c345b19142bb1646;hpb=15219459baed09d03d17a12c72302595c135fd53 diff --git a/src/dialogs/DomainSettingsDialog.cpp b/src/dialogs/DomainSettingsDialog.cpp index 34ff70e..ea5558c 100644 --- a/src/dialogs/DomainSettingsDialog.cpp +++ b/src/dialogs/DomainSettingsDialog.cpp @@ -22,7 +22,6 @@ #include "Settings.h" #include "ui_DomainSettingsDialog.h" #include "databases/DomainsDatabase.h" -#include "helpers/UserAgentHelper.h" // Qt toolkit headers. #include @@ -41,7 +40,10 @@ DomainSettingsDialog::DomainSettingsDialog(const int &startType, const QString & setWindowTitle(i18nc("The domain settings dialog window title", "Domain Settings")); // Set the window modality. - setWindowModality(Qt::WindowModality::ApplicationModal);; + setWindowModality(Qt::WindowModality::ApplicationModal); + + // Instantiate the user agent helper. + userAgentHelperPointer = new UserAgentHelper(); // Instantiate the domain settings dialog UI. Ui::DomainSettingsDialog domainSettingsDialogUi; @@ -501,10 +503,10 @@ void DomainSettingsDialog::populateLocalStorageLabel() const void DomainSettingsDialog::populateUserAgentLabel(const QString &userAgentName) const { // Populate the label according to the type. - if (userAgentName == UserAgentHelper::SYSTEM_DEFAULT_TRANSLATED) + if (userAgentName == userAgentHelperPointer->SYSTEM_DEFAULT_TRANSLATED) { // Display the system default user agent name. - userAgentLabelPointer->setText(UserAgentHelper::getTranslatedUserAgentNameFromDatabaseName(Settings::userAgent())); + userAgentLabelPointer->setText(userAgentHelperPointer->getTranslatedUserAgentNameFromDatabaseName(Settings::userAgent())); // Reset the palette. userAgentWidgetPointer->setPalette(defaultPalette); @@ -628,7 +630,7 @@ void DomainSettingsDialog::userAgentChanged(const QString &updatedUserAgent) con { // Update the domains table model. domainsTableModelPointer->setData(domainsSelectionModelPointer->currentIndex().siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::USER_AGENT)), - UserAgentHelper::getDatabaseUserAgentNameFromTranslatedName(updatedUserAgent)); + userAgentHelperPointer->getDatabaseUserAgentNameFromTranslatedName(updatedUserAgent)); // Populate the user agent label. populateUserAgentLabel(updatedUserAgent);