X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2FBrowserWindow.cpp;h=e2f17bd0d47f4cb5cf9f06c143cd3b260447c76a;hp=546a9519899b7ae5d472d124b667419e0d854a6d;hb=d37c965b5cc545db8845756ff2e059fd20a54869;hpb=11099c7bee4fc11fc1b59e67b322a502b616c2b4 diff --git a/src/BrowserWindow.cpp b/src/BrowserWindow.cpp index 546a951..e2f17bd 100644 --- a/src/BrowserWindow.cpp +++ b/src/BrowserWindow.cpp @@ -22,6 +22,7 @@ #include "Settings.h" #include "ui_SettingsPrivacy.h" #include "ui_SettingsGeneral.h" +#include "UserAgentHelper.h" // KDE Frameworks headers. #include @@ -53,7 +54,7 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow() setupGUI(); } -void BrowserWindow::fileNew() +void BrowserWindow::fileNew() const { // Display a new instance of Privacy Browser. (new BrowserWindow)->show(); @@ -80,9 +81,6 @@ void BrowserWindow::settingsConfigure() QComboBox *userAgentComboBoxPointer = privacySettingsUi.kcfg_userAgent; userAgentLabelPointer = privacySettingsUi.userAgentLabel; - // Instantiate the user agent helper. - userAgentHelperPointer = new UserAgentHelper(); - // Display the initial user agent. updateUserAgentLabel(userAgentComboBoxPointer->currentText()); @@ -111,14 +109,14 @@ void BrowserWindow::settingsConfigure() } } -void BrowserWindow::updateStatusBar(const QString &statusBarMessage) +void BrowserWindow::updateStatusBar(const QString &statusBarMessage) const { // Display the status bar message. statusBar()->showMessage(statusBarMessage); } -void BrowserWindow::updateUserAgentLabel(const QString &userAgentName) +void BrowserWindow::updateUserAgentLabel(const QString &userAgentName) const { // Update the user agent label. - userAgentLabelPointer->setText(userAgentHelperPointer->getUserAgent(userAgentName)); + userAgentLabelPointer->setText(UserAgentHelper::getUserAgent(userAgentName)); }