diff --git a/src/lib/other/useragentmanager.cpp b/src/lib/other/useragentmanager.cpp index 35078ef3f..28ad99c9f 100644 --- a/src/lib/other/useragentmanager.cpp +++ b/src/lib/other/useragentmanager.cpp @@ -44,8 +44,9 @@ void UserAgentManager::loadSettings() QStringList userAgentsList = settings.value(QSL("UserAgentsList"), QStringList()).toStringList(); settings.endGroup(); - m_usePerDomainUserAgent = (m_usePerDomainUserAgent && domainList.count() == userAgentsList.count()); + m_usePerDomainUserAgent = (m_usePerDomainUserAgent && (domainList.count() == userAgentsList.count())); + m_userAgentsList.clear(); if (m_usePerDomainUserAgent) { for (int i = 0; i < domainList.count(); ++i) { m_userAgentsList[domainList.at(i)] = userAgentsList.at(i); diff --git a/src/lib/preferences/useragentdialog.cpp b/src/lib/preferences/useragentdialog.cpp index 9bf44b4da..78e171d5a 100644 --- a/src/lib/preferences/useragentdialog.cpp +++ b/src/lib/preferences/useragentdialog.cpp @@ -176,6 +176,7 @@ void UserAgentDialog::accept() settings.setValue(QSL("DomainList"), domainList); settings.setValue(QSL("UserAgentsList"), userAgentsList); settings.endGroup(); + settings.sync(); m_manager->loadSettings(); mApp->networkManager()->loadSettings();