Clear the URL line edit when navigating history. https://redmine.stoutner.com/issues/841
[PrivacyBrowserPC.git] / src / windows / BrowserWindow.cpp
index a29b5037c83af5ae69dcfd9f146228fc96f0e251..3ddba02c9e3809475a6d7393354b5cbc5eae33fb 100644 (file)
@@ -218,6 +218,9 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow()
     connect(browserViewPointer, SIGNAL(showProgressBar(const int)), this, SLOT(showProgressBar(const int)));
     connect(browserViewPointer, SIGNAL(hideProgressBar()), progressBarPointer, SLOT(hide()));
 
+    // Clear the URL line edit focus when requested.
+    connect(browserViewPointer, SIGNAL(clearUrlLineEditFocus()), this, SLOT(clearUrlLineEditFocus()));
+
     // Get the URL line edit palettes.
     noDomainSettingsPalette = urlLineEditPointer->palette();
     domainSettingsPalette = urlLineEditPointer->palette();
@@ -274,6 +277,12 @@ void BrowserWindow::back() const
     browserViewPointer->back();
 }
 
+void BrowserWindow::clearUrlLineEditFocus() const
+{
+    // Remove the focus from the URL line edit.
+    urlLineEditPointer->clearFocus();
+}
+
 void BrowserWindow::fileNew() const
 {
     // Display a new instance of Privacy Browser.