X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fviews%2FBrowserView.cpp;h=6bdbda6536cc2dcea6f421267ccc8a5781860959;hb=823acbeb2cc27030857f249ab7157d8562e7b7fe;hp=ef69db4f784002bcd01978b62981533645b4e681;hpb=10f39f4db8275d73df3cd2e501de054622adfe58;p=PrivacyBrowserPC.git diff --git a/src/views/BrowserView.cpp b/src/views/BrowserView.cpp index ef69db4..6bdbda6 100644 --- a/src/views/BrowserView.cpp +++ b/src/views/BrowserView.cpp @@ -210,7 +210,7 @@ void BrowserView::applyApplicationSettings() searchEngineUrl = SearchEngineHelper::getSearchUrl(Settings::searchEngine()); // Emit the update search engine actions signal. - emit updateSearchEngineActions(Settings::searchEngine()); + emit updateSearchEngineActions(Settings::searchEngine(), true); } // This exists as a separate function from `applyDomainSettings()` so it can be listed as a slot and function without the need for a boolean argument. @@ -374,14 +374,12 @@ void BrowserView::applyDomainSettings(const QString &hostname, const bool reload emit updateJavaScriptAction(webEngineSettingsPointer->testAttribute(QWebEngineSettings::JavascriptEnabled)); emit updateLocalStorageAction(currentPrivacyWebEnginePointer->localStorageEnabled); emit updateDomStorageAction(webEngineSettingsPointer->testAttribute(QWebEngineSettings::LocalStorageEnabled)); - emit updateUserAgentActions(webEngineProfilePointer->httpUserAgent()); + emit updateUserAgentActions(webEngineProfilePointer->httpUserAgent(), true); emit updateZoomFactorAction(webEngineViewPointer->zoomFactor()); // Reload the website if requested. if (reloadWebsite) - { webEngineViewPointer->reload(); - } } void BrowserView::applyOnTheFlySearchEngine(QAction *searchEngineActionPointer) @@ -394,6 +392,9 @@ void BrowserView::applyOnTheFlySearchEngine(QAction *searchEngineActionPointer) // Store the search engine string. searchEngineUrl = SearchEngineHelper::getSearchUrl(searchEngineName); + + // Update the search engine actionas. + emit updateSearchEngineActions(searchEngineName, false); } void BrowserView::applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const @@ -407,6 +408,9 @@ void BrowserView::applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const // Apply the user agent. webEngineProfilePointer->setHttpUserAgent(UserAgentHelper::getUserAgentFromTranslatedName(userAgentName)); + // Update the user agent actions. + emit updateUserAgentActions(webEngineProfilePointer->httpUserAgent(), false); + // Reload the website. webEngineViewPointer->reload(); }