#include "Settings.h"
#include "ui_SettingsPrivacy.h"
#include "ui_SettingsGeneral.h"
+#include "UserAgentHelper.h"
// KDE Frameworks headers.
#include <KActionCollection>
setupGUI();
}
-void BrowserWindow::fileNew()
+void BrowserWindow::fileNew() const
{
// Display a new instance of Privacy Browser.
(new BrowserWindow)->show();
QComboBox *userAgentComboBoxPointer = privacySettingsUi.kcfg_userAgent;
userAgentLabelPointer = privacySettingsUi.userAgentLabel;
- // Instantiate the user agent helper.
- userAgentHelperPointer = new UserAgentHelper();
-
// Display the initial user agent.
updateUserAgentLabel(userAgentComboBoxPointer->currentText());
}
}
-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));
}