Fix the loading of websites when the user agent changes. https://redmine.stoutner...
authorSoren Stoutner <soren@stoutner.com>
Sat, 26 Mar 2022 04:52:15 +0000 (21:52 -0700)
committerSoren Stoutner <soren@stoutner.com>
Sat, 26 Mar 2022 04:52:15 +0000 (21:52 -0700)
src/main.cpp
src/ui.rc/browser_ui.rc
src/views/BrowserView.cpp
src/views/BrowserView.h
src/windows/BrowserWindow.cpp
src/windows/BrowserWindow.h

index ad23101308f26360e730b358fb6c2d968c0aa86f..6aa5c51a28c3eaf9c5aa443cd92667a5aa31a17c 100644 (file)
@@ -54,7 +54,8 @@ int main(int argc, char *argv[])
     aboutData.setCopyrightStatement(i18n("Copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>"));
     aboutData.setDesktopFileName(QStringLiteral("com.stoutner.privacybrowser"));
     aboutData.setHomepage(QStringLiteral("https://www.stoutner.com/privacy-browser-pc/"));
-    aboutData.setLicenseTextFile(":/licenses/GPLv3+.txt");
+    //aboutData.setLicense(KAboutLicense::GPL_V3, KAboutLicense::OrLaterVersions);  <https://redmine.stoutner.com/issues/822>
+    aboutData.setLicenseTextFile(QStringLiteral(":/licenses/GPLv3+.txt"));
     aboutData.setOrganizationDomain("stoutner.com");
     aboutData.setShortDescription(i18n("A web browser that respects your privacy."));
 
index 3b086cffaf6b261a7f37399bf2aab83fe7b0e9df..ec7729e04b988f4fa49ccd94cf63401137f9077d 100644 (file)
@@ -19,6 +19,7 @@
   along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>. -->
 
 <!-- Documentation at <https://techbase.kde.org/Development/Architecture/KDE4/XMLGUI_Technology>. -->
+<!-- Better documentation at <https://invent.kde.org/frameworks/kxmlgui/-/blob/master/src/kxmlgui.xsd>. -->
 <gui
     name="privacybrowser"
     version="1"
@@ -26,6 +27,7 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.kde.org/standards/kxmlgui/1.0 http://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd" >
 
+    <!-- The menu bar. -->
     <MenuBar>
         <Menu name="on_the_fly_settings"> <text>On-The-Fly Settings</text>
             <Menu name="user_agent"> <text>User Agent</text>
         </Menu>
     </MenuBar>
 
-    <ToolBar name="mainToolBar" noMerge="1">
-        <text>Main Toolbar</text>
+    <!-- The main toolbar is removed. -->
+    <ToolBar name="mainToolBar" deleted="true" />
+
+    <!-- The navigation toolbar. -->
+    <ToolBar name="navigation_toolbar" iconText="icononly"> <text>Navigation Toolbar</text>
+        <Action name="back" />
+        <Action name="forward" />
+        <Action name="refresh" />
+        <Action name="home" />
     </ToolBar>
+
+    <!-- The URL toolbar. -->
+    <ToolBar name="url_toolbar" iconText="icononly"> <text>URL Toolbar</text> </ToolBar>
 </gui>
index c6a984c880023acc641d7fa18cbc3ca419c27b5d..07c11301b1619f5eef790eafb42654eb20929c56 100644 (file)
@@ -57,27 +57,27 @@ BrowserView::BrowserView(QWidget *parent) : QWidget(parent)
     webEngineProfilePointer = webEnginePagePointer->profile();
     webEngineSettingsPointer = webEngineViewPointer->settings();
 
-    // Update the webengine view from the URL line edit.
-    connect(urlLineEditPointer, SIGNAL(returnKeyPressed(const QString)), this, SLOT(loadUrlFromTextBox(const QString)));
+    // Update the webengine view from the URL line edit.  TODO.  Remove.
+    connect(urlLineEditPointer, SIGNAL(returnKeyPressed(const QString)), this, SLOT(loadUrlFromLineEdit(const QString)));
 
     // Update the URL line edit from the webengine view.
     connect(webEngineViewPointer, SIGNAL(loadStarted()), this, SLOT(updateInterface()));
     connect(webEngineViewPointer, SIGNAL(loadProgress(const int)), this, SLOT(updateInterface()));
     connect(webEngineViewPointer, SIGNAL(loadFinished(const bool)), this, SLOT(updateInterface()));
 
-    // Setup the URL bar buttons.
+    // Setup the URL bar buttons.  TODO.  Remove.
     connect(backButtonPointer, SIGNAL(clicked()), webEngineViewPointer, SLOT(back()));
     connect(forwardButtonPointer, SIGNAL(clicked()), webEngineViewPointer, SLOT(forward()));
     connect(refreshButtonPointer, SIGNAL(clicked()), webEngineViewPointer, SLOT(reload()));
-    connect(homeButtonPointer, SIGNAL(clicked()), this, SLOT(goHome()));
+    connect(homeButtonPointer, SIGNAL(clicked()), this, SLOT(home()));
     connect(javaScriptButtonPointer, SIGNAL(clicked()), this, SLOT(toggleJavaScript()));
     connect(domainSettingsButtonPointer, SIGNAL(clicked()), this, SLOT(openDomainSettings()));
 
-    // Get the URL line edit palettes.
+    // Get the URL line edit palettes.  TODO.  Remove.
     noDomainSettingsPalette = urlLineEditPointer->palette();
     domainSettingsPalette = urlLineEditPointer->palette();
 
-    // Modify the domain settings palette.
+    // Modify the domain settings palette.  TODO.  Remove.
     domainSettingsPalette.setColor(QPalette::Base, QColor("#C8E6C9"));
 
     // Instantiate the mouse event pointer.
@@ -177,7 +177,8 @@ void BrowserView::applyDomainSettings(const QString &hostname, const bool reload
         webEngineViewPointer->setZoomFactor(Settings::zoomFactor());
 
         // Apply the domain settings palette to the URL line edit.
-        urlLineEditPointer->setPalette(domainSettingsPalette);
+        urlLineEditPointer->setPalette(domainSettingsPalette);  // TODO.  Remove.
+        emit updateDomainSettingsIndicator(true);
     }
     else  // The hostname does not have domain settings.
     {
@@ -191,7 +192,8 @@ void BrowserView::applyDomainSettings(const QString &hostname, const bool reload
         webEngineViewPointer->setZoomFactor(Settings::zoomFactor());
 
         // Apply the no domain settings palette to the URL line edit.
-        urlLineEditPointer->setPalette(noDomainSettingsPalette);
+        urlLineEditPointer->setPalette(noDomainSettingsPalette);  // TODO.  Remove.
+        emit updateDomainSettingsIndicator(false);
     }
 
     // Update the JavaScript button.
@@ -248,10 +250,22 @@ void BrowserView::applyOnTheFlyZoomFactor(const double &zoomFactor) const
     webEngineViewPointer->setZoomFactor(zoomFactor);
 }
 
-void BrowserView::goHome() const
+void BrowserView::back() const
+{
+    // Go back.
+    webEngineViewPointer->back();
+}
+
+void BrowserView::forward() const
+{
+    // Go forward.
+    webEngineViewPointer->forward();
+}
+
+void BrowserView::home() const
 {
     // Load the homepage.
-    webEngineViewPointer->setUrl(QUrl::fromUserInput(Settings::homepage()));
+    webEngineViewPointer->load(QUrl::fromUserInput(Settings::homepage()));
 }
 
 void BrowserView::loadInitialWebsite()
@@ -266,37 +280,37 @@ void BrowserView::loadInitialWebsite()
     if (argumentsStringList.size() > 1)
     {
         // Load the URL from the arguments list.
-        webEngineViewPointer->setUrl(QUrl::fromUserInput(argumentsStringList.at(1)));
+        webEngineViewPointer->load(QUrl::fromUserInput(argumentsStringList.at(1)));
     }
     else
     {
         // Load the homepage.
-        goHome();
+        home();
     }
 }
 
-void BrowserView::loadUrlFromTextBox(QString urlFromUser) const
+void BrowserView::loadUrlFromLineEdit(QString url) const
 {
-    // Remove the focus from the URL line edit.
+    // Remove the focus from the URL line edit.  TODO.  Remove.
     urlLineEditPointer->clearFocus();
 
     // Decide if the text is more likely to be a URL or a search.
-    if (urlFromUser.contains("."))  // The text is likely a URL.
+    if (url.contains("."))  // The text is likely a URL.
     {
         // Check if the URL does not start with a valid protocol.
-        if (!urlFromUser.startsWith("http") && !urlFromUser.startsWith("file://"))
+        if (!url.startsWith("http") && !url.startsWith("file://"))
         {
             // Add `https://` to the beginning of the URL.
-            urlFromUser = "https://" + urlFromUser;
+            url = "https://" + url;
         }
 
         // Load the URL.
-        webEngineViewPointer->setUrl(QUrl::fromUserInput(urlFromUser));
+        webEngineViewPointer->load(QUrl::fromUserInput(url));
     }
     else  // The text is likely a search.
     {
         // Load the search.
-        webEngineViewPointer->setUrl(QUrl::fromUserInput(searchEngineUrl + urlFromUser));
+        webEngineViewPointer->load(QUrl::fromUserInput(searchEngineUrl + url));
     }
 }
 
@@ -324,6 +338,12 @@ void BrowserView::pageLinkHovered(const QString &linkUrl) const
     emit linkHovered(linkUrl);
 }
 
+void BrowserView::refresh() const
+{
+    // Reload the website.
+    webEngineViewPointer->reload();
+}
+
 void BrowserView::toggleJavaScript() const
 {
     // Toggle JavaScript.
@@ -345,16 +365,21 @@ void BrowserView::toggleJavaScript() const
 
 void BrowserView::updateInterface() const
 {
-    // Update the URL line edit if it does not have focus.
+    // Update the URL line edit if it does not have focus.  TODO.  Remove block.
     if (!urlLineEditPointer->hasFocus())
     {
         // Update the URL line edit.
         urlLineEditPointer->setText(webEngineViewPointer->url().toString());
     }
 
+    // Update the URL line edit.
+    emit updateUrlLineEdit(webEngineViewPointer->url().toString());
+
     // Update the status of the forward and back buttons.
-    backButtonPointer->setEnabled(webEngineHistoryPointer->canGoBack());
-    forwardButtonPointer->setEnabled(webEngineHistoryPointer->canGoForward());
+    backButtonPointer->setEnabled(webEngineHistoryPointer->canGoBack());  // TODO Remove.
+    emit updateBackAction(webEngineHistoryPointer->canGoBack());
+    forwardButtonPointer->setEnabled(webEngineHistoryPointer->canGoForward());  // TODO Remove.
+    emit updateForwardAction(webEngineHistoryPointer->canGoForward());
 
     // Reapply the zoom factor.  This is a bug in QWebEngineView that resets the zoom with every load.  Hopefully it will be fixed in Qt6.  <https://bugreports.qt.io/browse/QTBUG-51992>
     webEngineViewPointer->setZoomFactor(Settings::zoomFactor());
index 26852164c2be5553bd0c4eded362a76bcc53dd52..27c4439cd64dd117b73f5aa889978d3a041415c3 100644 (file)
@@ -47,6 +47,10 @@ signals:
     void linkHovered(const QString &linkUrl) const;
     void userAgentUpdated(const QString &userAgent) const;
     void searchEngineUpdated(const QString &searchEngine) const;
+    void updateBackAction(const bool &isEnabled) const;
+    void updateDomainSettingsIndicator(const bool status) const;
+    void updateForwardAction(const bool &isEnabled) const;
+    void updateUrlLineEdit(const QString &newUrl) const;
     void zoomFactorUpdated(const double &zoomFactor) const;
 
 public Q_SLOTS:
@@ -56,11 +60,14 @@ public Q_SLOTS:
     void applyDomainSettingsWithoutReloading(const QString &hostname) const;
     void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer);
     void applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const;
+    void back() const;
+    void forward() const;
+    void home() const;
+    void loadUrlFromLineEdit(QString url) const;
+    void refresh() const;
 
 private Q_SLOTS:
     // The private slots.
-    void goHome() const;
-    void loadUrlFromTextBox(QString urlFromUser) const;
     void pageLinkHovered(const QString &linkUrl) const;
     void toggleJavaScript() const;
     void openDomainSettings() const;
@@ -69,10 +76,10 @@ private Q_SLOTS:
 private:
     // The private variables.
     QPushButton *backButtonPointer;
-    QPalette domainSettingsPalette;
+    QPalette domainSettingsPalette;  // TODO.  Remove.
     QPushButton *forwardButtonPointer;
     QPushButton *javaScriptButtonPointer;
-    QPalette noDomainSettingsPalette;
+    QPalette noDomainSettingsPalette;  // TODO.  Remove.
     QString searchEngineUrl;
     KLineEdit *urlLineEditPointer;
     QWebEngineHistory *webEngineHistoryPointer;
index 3d6eb61880f8954792a9f024db2a4a19cd84f5f4..5a84d40c97df93be9cf436b198e3431f3177299a 100644 (file)
@@ -27,6 +27,7 @@
 
 // KDE Frameworks headers.
 #include <KActionCollection>
+#include <KToolBar>
 
 // Qt toolkit headers.
 #include <QInputDialog>
@@ -65,6 +66,10 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow()
     searchEngineBingActionPointer = actionCollectionPointer->addAction(QStringLiteral("search_engine_bing"));
     searchEngineYahooActionPointer = actionCollectionPointer->addAction(QStringLiteral("search_engine_yahoo"));
     searchEngineCustomActionPointer = actionCollectionPointer->addAction(QStringLiteral("search_engine_custom"));
+    backActionPointer = actionCollectionPointer->addAction(QStringLiteral("back"));
+    forwardActionPointer = actionCollectionPointer->addAction(QStringLiteral("forward"));
+    refreshActionPointer = actionCollectionPointer->addAction(QStringLiteral("refresh"));
+    homeActionPointer = actionCollectionPointer->addAction(QStringLiteral("home"));
 
     // Create the action groups
     QActionGroup *userAgentActionGroupPointer = new QActionGroup(this);
@@ -112,12 +117,22 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow()
     userAgentChromeWindowsActionPointer->setText(UserAgentHelper::CHROME_WINDOWS_TRANSLATED);
     userAgentEdgeWindowsActionPointer->setText(UserAgentHelper::EDGE_WINDOWS_TRANSLATED);
     userAgentSafariMacosActionPointer->setText(UserAgentHelper::SAFARI_MACOS_TRANSLATED);
-    searchEngineMojeekActionPointer->setText(i18nc("@action", "Mojeek"));
-    searchEngineMonoclesActionPointer->setText(i18nc("@action", "Monocles"));
-    searchEngineMetagerActionPointer->setText(i18nc("@action", "MetaGer"));
-    searchEngineGoogleActionPointer->setText(i18nc("@action", "Google"));
-    searchEngineBingActionPointer->setText(i18nc("@action", "Bing"));
-    searchEngineYahooActionPointer->setText(i18nc("@action", "Yahoo"));
+    searchEngineMojeekActionPointer->setText(i18nc("Search engine", "Mojeek"));
+    searchEngineMonoclesActionPointer->setText(i18nc("Search engine", "Monocles"));
+    searchEngineMetagerActionPointer->setText(i18nc("Search engine", "MetaGer"));
+    searchEngineGoogleActionPointer->setText(i18nc("Search engine", "Google"));
+    searchEngineBingActionPointer->setText(i18nc("Search engine", "Bing"));
+    searchEngineYahooActionPointer->setText(i18nc("Search engine", "Yahoo"));
+    backActionPointer->setText(i18nc("Back button", "Back"));
+    forwardActionPointer->setText(i18nc("Forward button", "Forward"));
+    refreshActionPointer->setText(i18nc("Refresh button", "Refresh"));
+    homeActionPointer->setText(i18nc("Home button", "Home"));
+
+    // Set the action icons.
+    backActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("arrow-left")));
+    forwardActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right")));
+    refreshActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
+    homeActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("home")));
 
     // Update the on-the-fly menus.
     connect(browserViewPointer, SIGNAL(userAgentUpdated(QString)), this, SLOT(updateOnTheFlyUserAgent(QString)));
@@ -131,22 +146,78 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow()
     // Display dialogs.
     connect(zoomFactorActionPointer, SIGNAL(triggered()), this, SLOT(getZoomFactorFromUser()));
 
-    // Update the status bar with the URL when a link is hovered.
-    connect(browserViewPointer, SIGNAL(linkHovered(QString)), this, SLOT(updateStatusBar(QString)));
+    // Connect the URL toolbar actions.
+    connect(backActionPointer, SIGNAL(triggered()), this, SLOT(back()));
+    connect(forwardActionPointer, SIGNAL(triggered()), this, SLOT(forward()));
+    connect(refreshActionPointer, SIGNAL(triggered()), this, SLOT(refresh()));
+    connect(homeActionPointer, SIGNAL(triggered()), this, SLOT(home()));
+
+    // Update the URL toolbar actions.
+    connect(browserViewPointer, SIGNAL(updateBackAction(bool)), backActionPointer, SLOT(setEnabled(bool)));
+    connect(browserViewPointer, SIGNAL(updateForwardAction(bool)), forwardActionPointer, SLOT(setEnabled(bool)));
 
     // Setup the GUI based on the browser_ui.rc file.
     setupGUI(StandardWindowOption::Default, ("browser_ui.rc"));
 
-    // Load the initial webstie.
+    // Get a handle for the URL toolbar.
+    KToolBar *urlToolBarPointer = toolBar(QStringLiteral("url_toolbar"));
+
+    // Create a URL line edit.
+    urlLineEditPointer = new KLineEdit();
+
+    // Add the URL line edit to the URL toolbar.
+    urlToolBarPointer->addWidget(urlLineEditPointer);
+
+    // Load a new URL from the URL line edit.
+    connect(urlLineEditPointer, SIGNAL(returnKeyPressed(const QString)), this, SLOT(loadUrlFromLineEdit(const QString)));
+
+    // Update the URL line edit on page loads.
+    connect(browserViewPointer, SIGNAL(updateUrlLineEdit(QString)), this, SLOT(updateUrlLineEdit(QString)));
+
+    // Get a handle for the status bar.
+    QStatusBar *statusBarPointer = statusBar();
+
+    // Update the status bar with the URL when a link is hovered.
+    connect(browserViewPointer, SIGNAL(linkHovered(QString)), statusBarPointer, SLOT(showMessage(QString)));
+
+    // Get the URL line edit palettes.
+    noDomainSettingsPalette = urlLineEditPointer->palette();
+    domainSettingsPalette = urlLineEditPointer->palette();
+
+    // Modify the domain settings palette.
+    domainSettingsPalette.setColor(QPalette::Base, QColor("#C8E6C9"));
+
+    // Update the applied palette.
+    connect(browserViewPointer, SIGNAL(updateDomainSettingsIndicator(bool)), this, SLOT(updateDomainSettingsIndicator(bool)));
+
+    // Load the initial website.
     browserViewPointer->loadInitialWebsite();
 }
 
+void BrowserWindow::back() const
+{
+    // Remove the focus from the URL line edit.
+    urlLineEditPointer->clearFocus();
+
+    // Go back.
+    browserViewPointer->back();
+}
+
 void BrowserWindow::fileNew() const
 {
     // Display a new instance of Privacy Browser.
     (new BrowserWindow)->show();
 }
 
+void BrowserWindow::forward() const
+{
+    // Remove the focus from the URL line edit.
+    urlLineEditPointer->clearFocus();
+
+    // Go forward.
+    browserViewPointer->forward();
+}
+
 void BrowserWindow::getZoomFactorFromUser()
 {
     // Create an OK flag.
@@ -171,6 +242,33 @@ void BrowserWindow::getZoomFactorFromUser()
     }
 }
 
+void BrowserWindow::home() const
+{
+    // Remove the focus from the URL line edit.
+    urlLineEditPointer->clearFocus();
+
+    // Go home.
+    browserViewPointer->home();
+}
+
+void BrowserWindow::loadUrlFromLineEdit(const QString &url) const
+{
+    // Remove the focus from the URL line edit.
+    urlLineEditPointer->clearFocus();
+
+    // Load the URL.
+    browserViewPointer->loadUrlFromLineEdit(url);
+}
+
+void BrowserWindow::refresh() const
+{
+    // Remove the focus from the URL line edit.
+    urlLineEditPointer->clearFocus();
+
+    // Refresh the web page.
+    browserViewPointer->refresh();
+}
+
 void BrowserWindow::settingsConfigure()
 {
     // Check to make sure the dialog box isn't already displayed.
@@ -231,11 +329,11 @@ void BrowserWindow::settingsConfigure()
         // Make it so.
         configDialogPointer->show();
 
-        // TODO.  KConfigDialog does not respect expanding size policies.
-        configDialogPointer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-        privacySettingsWidgetPointer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-        generalSettingsWidgetPointer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-        configDialogPointer->adjustSize();
+        // TODO.  KConfigDialog does not respect expanding size policies.  <https://redmine.stoutner.com/issues/823>
+        //configDialogPointer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+        //privacySettingsWidgetPointer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+        //generalSettingsWidgetPointer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+        //configDialogPointer->adjustSize();
 
         // Expand the config dialog.
         configDialogPointer->resize(1000, 500);
@@ -246,6 +344,13 @@ void BrowserWindow::settingsConfigure()
     }
 }
 
+void BrowserWindow::updateDomainSettingsIndicator(const bool status) const
+{
+    // Set the domain palette according to the status.
+    if (status) urlLineEditPointer->setPalette(domainSettingsPalette);
+    else urlLineEditPointer->setPalette(noDomainSettingsPalette);
+}
+
 void BrowserWindow::updateOnTheFlySearchEngine(const QString &searchEngine) const
 {
     // Initialize the custom search engine flag.
@@ -284,7 +389,6 @@ void BrowserWindow::updateOnTheFlySearchEngine(const QString &searchEngine) cons
         customSearchEngine = true;
     }
 
-
     // Format the custom search engine.
     if (customSearchEngine)
     {
@@ -361,10 +465,14 @@ void BrowserWindow::updateSearchEngineLabel(const QString &searchEngineString) c
     searchEngineLabelPointer->setText(SearchEngineHelper::getSearchUrl(searchEngineString));
 }
 
-void BrowserWindow::updateStatusBar(const QString &statusBarMessage) const
+void BrowserWindow::updateUrlLineEdit(const QString &newUrl) const
 {
-    // Display the status bar message.
-    statusBar()->showMessage(statusBarMessage);
+    // Update the URL line edit if it does not have focus.
+    if (!urlLineEditPointer->hasFocus())
+    {
+        // Update the URL line edit.
+        urlLineEditPointer->setText(newUrl);
+    }
 }
 
 void BrowserWindow::updateUserAgentLabel(const QString &userAgentDatabaseName) const
index f4dc071e5f4c597c245f270e1dcf484fed09dbab..f86c1b2f11f7bfdd58ba3fa76ab106b229db6a82 100644 (file)
@@ -41,20 +41,32 @@ public:
 
 private Q_SLOTS:
     // The private slots.
+    void back() const;
     void fileNew() const;
+    void forward() const;
     void getZoomFactorFromUser();
+    void home() const;
+    void loadUrlFromLineEdit(const QString &url) const;
+    void refresh() const;
     void settingsConfigure();
+    void updateDomainSettingsIndicator(const bool status) const;
     void updateOnTheFlySearchEngine(const QString &searchEngine) const;
     void updateOnTheFlyUserAgent(const QString &userAgent) const;
     void updateOnTheFlyZoomFactor(const double &zoomFactor);
     void updateSearchEngineLabel(const QString &searchEngineString) const;
-    void updateStatusBar(const QString &statusBarMessage) const;
+    void updateUrlLineEdit(const QString &newUrl) const;
     void updateUserAgentLabel(const QString &userAgentDatabaseName) const;
 
 private:
     // The private variables.
+    QAction *backActionPointer;
     BrowserView *browserViewPointer;
+    KConfigDialog *configDialogPointer;
+    QPalette domainSettingsPalette;
     double currentZoomFactor;
+    QAction *forwardActionPointer;
+    QAction *homeActionPointer;
+    QPalette noDomainSettingsPalette;
     QLabel *searchEngineLabelPointer;
     QAction *searchEngineMojeekActionPointer;
     QAction *searchEngineMonoclesActionPointer;
@@ -63,6 +75,7 @@ private:
     QAction *searchEngineBingActionPointer;
     QAction *searchEngineYahooActionPointer;
     QAction *searchEngineCustomActionPointer;
+    QAction *refreshActionPointer;
     QLabel *userAgentLabelPointer;
     QAction *userAgentPrivacyBrowserActionPointer;
     QAction *userAgentFirefoxLinuxActionPointer;
@@ -72,7 +85,7 @@ private:
     QAction *userAgentEdgeWindowsActionPointer;
     QAction *userAgentSafariMacosActionPointer;
     QAction *userAgentCustomActionPointer;
+    KLineEdit *urlLineEditPointer;
     QAction *zoomFactorActionPointer;
-    KConfigDialog *configDialogPointer;
 };
 #endif