+ // Get a handle for the URL toolbar.
+ KToolBar *urlToolBarPointer = toolBar(QStringLiteral("url_toolbar"));
+
+ // Create a URL line edit.
+ urlLineEditPointer = new KLineEdit();
+
+ // Add an edit or add domain settings action to the URL line edit.
+ QAction *addOrEditDomainSettingsActionPointer = urlLineEditPointer->addAction(QIcon::fromTheme("settings-configure"), QLineEdit::TrailingPosition);
+
+ // Add or edit the current domain settings.
+ connect(addOrEditDomainSettingsActionPointer, SIGNAL(triggered()), this, SLOT(addOrEditDomainSettings()));
+
+ // Populate the URL toolbar.
+ urlToolBarPointer->insertWidget(javaScriptActionPointer, 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(QUrl)), this, SLOT(updateUrlLineEdit(QUrl)));
+
+ // Get a handle for the status bar.
+ QStatusBar *statusBarPointer = statusBar();
+
+ // Create a progress bar.
+ progressBarPointer = new QProgressBar();
+
+ // Add the progress bar to to the status bar.
+ statusBarPointer->addPermanentWidget(progressBarPointer);
+
+ // Update the status bar with the URL when a link is hovered.
+ connect(browserViewPointer, SIGNAL(linkHovered(QString)), statusBarPointer, SLOT(showMessage(QString)));
+
+ // Update the progress bar.
+ 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();
+
+ // Modify the domain settings palette.
+ domainSettingsPalette.setColor(QPalette::Base, QColor("#C8E6C9"));
+
+ // Update the applied palette.
+ connect(browserViewPointer, SIGNAL(updateDomainSettingsIndicator(bool, QString)), this, SLOT(updateDomainSettingsIndicator(bool, QString)));
+
+ // Initialize the cookie list.
+ cookieListPointer = new QList<QNetworkCookie>;
+
+ // Add new cookies to the list.
+ connect(browserViewPointer, SIGNAL(addCookie(QNetworkCookie)), this, SLOT(addCookieToList(QNetworkCookie)));
+
+ // Load the initial website.