]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Add zoom factor domain settings.
authorSoren Stoutner <soren@stoutner.com>
Tue, 29 Mar 2022 23:25:24 +0000 (16:25 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 29 Mar 2022 23:25:24 +0000 (16:25 -0700)
src/DomainSettingsDialog.ui
src/dialogs/DomainSettingsDialog.cpp
src/dialogs/DomainSettingsDialog.h
src/helpers/DomainsDatabaseHelper.cpp
src/helpers/DomainsDatabaseHelper.h
src/ui.rc/browser_ui.rc
src/views/BrowserView.cpp
src/views/BrowserView.h
src/windows/BrowserWindow.cpp

index a2abaf7f149c8fdd6b2db5a8a001b56bb985be84..82d6a0d94351d8b063dcc9dd11726d38b5709ad8 100644 (file)
                                         </property>
                                     </widget>
                                 </item>
+
+                                <!-- Zoom factor. -->
+                                <item row="5" column="0">
+                                    <widget class="QLabel">
+                                        <property name="text">
+                                            <string>Zoom factor</string>
+                                        </property>
+                                    </widget>
+                                </item>
+
+                                <item row="5" column="1">
+                                    <widget class="QComboBox" name="zoomFactorComboBox">
+                                        <item>
+                                            <property name="text">
+                                                <string>System default</string>
+                                            </property>
+                                        </item>
+
+                                        <item>
+                                            <property name="text">
+                                                <string>Custom</string>
+                                            </property>
+                                        </item>
+                                    </widget>
+                                </item>
+
+                                <item row="6" column="1">
+                                    <widget class="QDoubleSpinBox" name="customZoomFactorSpinBox">
+                                        <property name="toolTip">
+                                            <string>Set the zoom factor between 0.25 and 5.00.  The default is 1.00.</string>
+                                        </property>
+
+                                        <property name="minimum">
+                                            <double>0.250000000000000</double>
+                                        </property>
+
+                                        <property name="maximum">
+                                            <double>5.000000000000000</double>
+                                        </property>
+
+                                        <property name="singleStep">
+                                            <double>0.250000000000000</double>
+                                        </property>
+                                    </widget>
+                                </item>
                             </layout>
                         </widget>
                     </item>
index e44af92563d63fb62b6605b5e7ef144a4acce462..e3745b52b0c870a500b47c6f5d67243a0c604b31 100644 (file)
@@ -45,6 +45,8 @@ DomainSettingsDialog::DomainSettingsDialog(QWidget *parent) : QDialog(parent)
     javaScriptLabelPointer = domainSettingsDialogUi.javaScriptLabel;
     userAgentComboBoxPointer = domainSettingsDialogUi.userAgentComboBox;
     userAgentLabelPointer = domainSettingsDialogUi.userAgentLabel;
+    zoomFactorComboBoxPointer = domainSettingsDialogUi.zoomFactorComboBox;
+    customZoomFactorSpinBoxPointer = domainSettingsDialogUi.customZoomFactorSpinBox;
     QPushButton *addDomainButtonPointer = domainSettingsDialogUi.addDomainButton;
     deleteDomainButtonPointer = domainSettingsDialogUi.deleteDomainButton;
     QDialogButtonBox *dialogButtonBoxPointer = domainSettingsDialogUi.dialogButtonBox;
@@ -88,6 +90,8 @@ DomainSettingsDialog::DomainSettingsDialog(QWidget *parent) : QDialog(parent)
     connect(domainNameLineEditPointer, SIGNAL(textEdited(QString)), this, SLOT(domainNameChanged(QString)));
     connect(javaScriptComboBoxPointer, SIGNAL(currentIndexChanged(int)), this, SLOT(javaScriptChanged(int)));
     connect(userAgentComboBoxPointer, SIGNAL(currentTextChanged(QString)), this, SLOT(userAgentChanged(QString)));
+    connect(zoomFactorComboBoxPointer, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomFactorComboBoxChanged(int)));
+    connect(customZoomFactorSpinBoxPointer, SIGNAL(valueChanged(double)), this, SLOT(customZoomFactorChanged(double)));
 
     // Connect the buttons.
     connect(addDomainButtonPointer, SIGNAL(released()), this, SLOT(showAddMessageBox()));
@@ -135,7 +139,18 @@ void DomainSettingsDialog::cancel()
     reject();
 }
 
-void DomainSettingsDialog::domainNameChanged(QString updatedDomainName) const
+void DomainSettingsDialog::customZoomFactorChanged(const double &newValue) const
+{
+    // Update the domains table model.
+    domainsTableModelPointer->setData(domainsListViewPointer->selectionModel()->currentIndex().siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::CUSTOM_ZOOM_FACTOR)),
+                                      newValue);
+
+    // Update the UI.
+    updateUi();
+}
+
+
+void DomainSettingsDialog::domainNameChanged(const QString &updatedDomainName) const
 {
     // Update the domains table model.
     domainsTableModelPointer->setData(domainsListViewPointer->selectionModel()->currentIndex(), updatedDomainName);
@@ -145,7 +160,7 @@ void DomainSettingsDialog::domainNameChanged(QString updatedDomainName) const
 }
 
 
-void DomainSettingsDialog::domainSelected(QModelIndex modelIndex) const
+void DomainSettingsDialog::domainSelected(const QModelIndex &modelIndex) const
 {
     // Populate the domain name line edit pointer.
     domainNameLineEditPointer->setText(modelIndex.data().toString());
@@ -165,6 +180,18 @@ void DomainSettingsDialog::domainSelected(QModelIndex modelIndex) const
     // Set the custom user agent if specified.
     if (userAgentIndex == -1) userAgentComboBoxPointer->setCurrentText(userAgent);
 
+    // Get the zoom factor combo box index.
+    int zoomFactorComboBoxIndex = modelIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::ZOOM_FACTOR)).data().toInt();
+
+    // Populate the zoom factor combo box.
+    zoomFactorComboBoxPointer->setCurrentIndex(zoomFactorComboBoxIndex);
+
+    // Populate the custom zoom factor spin box.
+    customZoomFactorSpinBoxPointer->setValue(modelIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::CUSTOM_ZOOM_FACTOR)).data().toDouble());
+
+    // Set the initial visibility of the custom zoom factor spin box.
+    customZoomFactorSpinBoxPointer->setVisible(zoomFactorComboBoxIndex);
+
     // Populate the labels.
     populateJavaScriptLabel();
     populateUserAgentLabel(userAgentComboBoxPointer->currentText());
@@ -173,7 +200,7 @@ void DomainSettingsDialog::domainSelected(QModelIndex modelIndex) const
     updateUi();
 }
 
-void DomainSettingsDialog::javaScriptChanged(int newIndex) const
+void DomainSettingsDialog::javaScriptChanged(const int &newIndex) const
 {
     // Update the domains table model.
     domainsTableModelPointer->setData(domainsListViewPointer->selectionModel()->currentIndex().siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::JAVASCRIPT)),
@@ -282,14 +309,12 @@ void DomainSettingsDialog::showAddMessageBox()
         // Create a new domain record.
         QSqlRecord newDomainRecord = QSqlDatabase::database(DomainsDatabaseHelper::CONNECTION_NAME).record(DomainsDatabaseHelper::DOMAINS_TABLE);
 
-        // Add the new domain name.
+        // Set the values for the new domain.
         newDomainRecord.setValue(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::DOMAIN_NAME), newDomainName);
-
-        // Set the default value of `0` for JavaScript.
-        newDomainRecord.setValue(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::JAVASCRIPT), 0);
-
-        // Set the default value for the user agent.
+        newDomainRecord.setValue(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::JAVASCRIPT), DomainsDatabaseHelper::SYSTEM_DEFAULT);
         newDomainRecord.setValue(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::USER_AGENT), UserAgentHelper::SYSTEM_DEFAULT_DATABASE);
+        newDomainRecord.setValue(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::ZOOM_FACTOR), DomainsDatabaseHelper::SYSTEM_DEFAULT);
+        newDomainRecord.setValue(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::CUSTOM_ZOOM_FACTOR), 1.0);
 
         // Insert the new domain.  `-1` appends it to the end.
         domainsTableModelPointer->insertRecord(-1, newDomainRecord);
@@ -388,7 +413,7 @@ void DomainSettingsDialog::updateUi() const
     domainSettingsWidgetPointer->setVisible(domainsTableModelPointer->rowCount() > 0);
 }
 
-void DomainSettingsDialog::userAgentChanged(const QString updatedUserAgent) const
+void DomainSettingsDialog::userAgentChanged(const QString &updatedUserAgent) const
 {
     // Update the domains table model.
     domainsTableModelPointer->setData(domainsListViewPointer->selectionModel()->currentIndex().siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::USER_AGENT)),
@@ -401,4 +426,15 @@ void DomainSettingsDialog::userAgentChanged(const QString updatedUserAgent) cons
     updateUi();
 }
 
+void DomainSettingsDialog::zoomFactorComboBoxChanged(const int &newIndex) const
+{
+    // Update the domains table model.
+    domainsTableModelPointer->setData(domainsListViewPointer->selectionModel()->currentIndex().siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::ZOOM_FACTOR)),
+                                      newIndex);
+
+    // Update the visibility of the custom zoom factor spin box.
+    customZoomFactorSpinBoxPointer->setVisible(newIndex);
 
+    // Update the UI.
+    updateUi();
+}
index 6acfcb57e9d0cb8720ff12b3d19bb4784b0f90a1..06941775f47ae07b498df58f08fe57b8e7310315 100644 (file)
@@ -25,6 +25,7 @@
 
 // Qt toolkit headers.
 #include <QDialog>
+#include <QDoubleSpinBox>
 #include <QLabel>
 #include <QtSql>
 
@@ -44,18 +45,21 @@ private Q_SLOTS:
     // The private slots.
     void apply() const;
     void cancel();
-    void domainNameChanged(QString updatedDomainName) const;
-    void domainSelected(QModelIndex modelIndex) const;
-    void javaScriptChanged(int newIndex) const;
+    void customZoomFactorChanged(const double &newValue) const;
+    void domainNameChanged(const QString &updatedDomainName) const;
+    void domainSelected(const QModelIndex &modelIndex) const;
+    void javaScriptChanged(const int &newIndex) const;
     void ok();
     void reset() const;
     void showAddMessageBox();
     void showDeleteMessageBox() const;
-    void userAgentChanged(const QString updatedUserAgent) const;
+    void userAgentChanged(const QString &updatedUserAgent) const;
+    void zoomFactorComboBoxChanged(const int &newIndex) const;
 
 private:
     // The private variables.
     QPushButton *applyButtonPointer;
+    QDoubleSpinBox *customZoomFactorSpinBoxPointer;
     QPushButton *deleteDomainButtonPointer;
     QListView *domainsListViewPointer;
     KLineEdit *domainNameLineEditPointer;
@@ -66,6 +70,7 @@ private:
     QPushButton *resetButtonPointer;
     QComboBox *userAgentComboBoxPointer;
     QLabel *userAgentLabelPointer;
+    QComboBox *zoomFactorComboBoxPointer;
 
     // The private functions.
     void populateJavaScriptLabel() const;
index 48b28a34966733b7bbbbc26dadc043b94f5c71ae..5b6c4faa4caa8e78227be1dd8e691c94851b7c66 100644 (file)
@@ -26,13 +26,15 @@ const QString DomainsDatabaseHelper::CONNECTION_NAME = "domains_database";
 const QString DomainsDatabaseHelper::DOMAINS_TABLE = "domains";
 
 // Define the private static schema constants.
-const int DomainsDatabaseHelper::SCHEMA_VERSION = 2;
+const int DomainsDatabaseHelper::SCHEMA_VERSION = 3;
 
 // Define the public static database field names.
 const QString DomainsDatabaseHelper::_ID = "_id";
 const QString DomainsDatabaseHelper::DOMAIN_NAME = "domain_name";
 const QString DomainsDatabaseHelper::JAVASCRIPT = "javascript";
 const QString DomainsDatabaseHelper::USER_AGENT = "user_agent";
+const QString DomainsDatabaseHelper::ZOOM_FACTOR = "zoom_factor";
+const QString DomainsDatabaseHelper::CUSTOM_ZOOM_FACTOR = "custom_zoom_factor";
 
 // The default constructor.
 DomainsDatabaseHelper::DomainsDatabaseHelper() {}
@@ -75,6 +77,7 @@ void DomainsDatabaseHelper::addDatabase()
                         // Set the default value.
                         domainsDatabase.exec("UPDATE " + DOMAINS_TABLE + " SET " + JAVASCRIPT + " = 0" );
 
+                        // Fallthrough to the next case.
                         [[fallthrough]];
                     }
 
@@ -83,6 +86,17 @@ void DomainsDatabaseHelper::addDatabase()
                     {
                         // Add the User Agent column.
                         domainsDatabase.exec("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + USER_AGENT + " TEXT DEFAULT '" + UserAgentHelper::SYSTEM_DEFAULT_DATABASE + "'");
+
+                        // Fallthrough to the next case.
+                        [[fallthrough]];
+                    }
+
+                    // Upgrade from schema version 2.
+                    case 2:
+                    {
+                        // Add the Zoom Factor columns.
+                        domainsDatabase.exec("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + ZOOM_FACTOR + " INTEGER DEFAULT 0");
+                        domainsDatabase.exec("ALTER TABLE " + DOMAINS_TABLE + " ADD COLUMN " + CUSTOM_ZOOM_FACTOR + " REAL DEFAULT 1.0");
                     }
                 }
 
@@ -99,8 +113,10 @@ void DomainsDatabaseHelper::addDatabase()
             createTableQuery.prepare("CREATE TABLE " + DOMAINS_TABLE + "(" +
                 _ID + " INTEGER PRIMARY KEY, " +
                 DOMAIN_NAME + " TEXT, " +
-                JAVASCRIPT + " INTEGER DEFAULT 0," +
-                USER_AGENT + " TEXT DEFAULT '" + UserAgentHelper::SYSTEM_DEFAULT_DATABASE + "')"
+                JAVASCRIPT + " INTEGER DEFAULT 0, " +
+                USER_AGENT + " TEXT DEFAULT '" + UserAgentHelper::SYSTEM_DEFAULT_DATABASE + "', " +
+                ZOOM_FACTOR + " INTEGER DEFAULT 0, " +
+                CUSTOM_ZOOM_FACTOR + " REAL DEFAULT 1.0)"
             );
 
             // Execute the query.
index 4badf418208e29f3c573b425b442a889fc1911c2..b95988da1fc16e39e2b21a2fb12b6ed0c7acd376 100644 (file)
@@ -37,14 +37,17 @@ public:
     static const int SYSTEM_DEFAULT = 0;
     static const int DISABLED = 1;
     static const int ENABLED = 2;
+    static const int CUSTOM = 1;
 
     // The public constants.
     static const QString _ID;
     static const QString CONNECTION_NAME;
+    static const QString CUSTOM_ZOOM_FACTOR;
     static const QString DOMAIN_NAME;
     static const QString DOMAINS_TABLE;
     static const QString JAVASCRIPT;
     static const QString USER_AGENT;
+    static const QString ZOOM_FACTOR;
 
 private:
     // The private static constants.
index 73bf318446360f281bd95fb7e54d65b9e8831eea..3c46ee0a2f3e5000b60bf2faa79ea93745950762 100644 (file)
@@ -30,7 +30,7 @@
     <!-- 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 name="user_agent" icon="user-group-properties"> <text>User Agent</text>
                 <Action name="user_agent_privacy_browser" />
                 <Action name="user_agent_firefox_linux" />
                 <Action name="user_agent_chromium_linux" />
@@ -45,7 +45,7 @@
 
             <Separator />
 
-            <Menu name="search_engine"> <text>Search Engine</text>
+            <Menu name="search_engine" icon="search"> <text>Search Engine</text>
                 <Action name="search_engine_mojeek" />
                 <Action name="search_engine_monocles" />
                 <Action name="search_engine_metager" />
index 74b27cfdb534102dbdabdb354b8fb71cb4597f71..90539a3dfee1e89bfe7f45a992ca872547ce8a07 100644 (file)
@@ -104,20 +104,23 @@ void BrowserView::applyApplicationSettings()
 }
 
 // This exists as a separate function from `applyDomainSettings()` so it can be listed as a slot and function without the need for a boolean argument.
-void BrowserView::applyDomainSettingsAndReload() const
+// Once <https://redmine.stoutner.com/issues/799> has been resolved this can be `const`.
+void BrowserView::applyDomainSettingsAndReload()
 {
     // Apply the domain settings.  `true` reloads the website.
     applyDomainSettings(webEngineViewPointer->url().host(), true);
 }
 
 // This exists as a separate function from `applyDomainSettings()` so it can be listed as a slot and function without the need for a boolean argument.
-void BrowserView::applyDomainSettingsWithoutReloading(const QString &hostname) const
+// Once <https://redmine.stoutner.com/issues/799> has been resolved this can be `const`.
+void BrowserView::applyDomainSettingsWithoutReloading(const QString &hostname)
 {
     // Apply the domain settings  `false` does not reload the website.
     applyDomainSettings(hostname, false);
 }
 
-void BrowserView::applyDomainSettings(const QString &hostname, const bool reloadWebsite) const
+// Once <https://redmine.stoutner.com/issues/799> has been resolved this can be `const`.
+void BrowserView::applyDomainSettings(const QString &hostname, const bool reloadWebsite)
 {
     // Get the record for the hostname.
     QSqlQuery domainQuery = DomainsDatabaseHelper::getDomainQuery(hostname);
@@ -159,8 +162,20 @@ void BrowserView::applyDomainSettings(const QString &hostname, const bool reload
         // Set the user agent.
         webEngineProfilePointer->setHttpUserAgent(UserAgentHelper::getResultingDomainSettingsUserAgent(domainRecord.field(DomainsDatabaseHelper::USER_AGENT).value().toString()));
 
+        // Check if a custom zoom factor is set.  This can be removed once <https://redmine.stoutner.com/issues/799> has been resolved.
+        if (domainRecord.field(DomainsDatabaseHelper::ZOOM_FACTOR).value().toInt())
+        {
+            // Store the current zoom factor.
+            currentZoomFactor = domainRecord.field(DomainsDatabaseHelper::CUSTOM_ZOOM_FACTOR).value().toDouble();
+        }
+        else
+        {
+            // Reset the current zoom factor.
+            currentZoomFactor = Settings::zoomFactor();
+        }
+
         // Set the zoom factor.
-        webEngineViewPointer->setZoomFactor(Settings::zoomFactor());
+        webEngineViewPointer->setZoomFactor(currentZoomFactor);
 
         // Apply the domain settings palette to the URL line edit.
         emit updateDomainSettingsIndicator(true);
@@ -173,8 +188,11 @@ void BrowserView::applyDomainSettings(const QString &hostname, const bool reload
         // Set the user agent.
         webEngineProfilePointer->setHttpUserAgent(UserAgentHelper::getUserAgentFromDatabaseName(Settings::userAgent()));
 
+        // Store the current zoom factor.
+        currentZoomFactor = Settings::zoomFactor();
+
         // Set the zoom factor.
-        webEngineViewPointer->setZoomFactor(Settings::zoomFactor());
+        webEngineViewPointer->setZoomFactor(currentZoomFactor);
 
         // Apply the no domain settings palette to the URL line edit.
         emit updateDomainSettingsIndicator(false);
@@ -324,6 +342,6 @@ void BrowserView::updateInterface() const
     emit updateBackAction(webEngineHistoryPointer->canGoBack());
     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());
+    // Reapply the zoom factor.  This is a bug in QWebEngineView that resets the zoom with every load.  <https://redmine.stoutner.com/issues/799>
+    webEngineViewPointer->setZoomFactor(currentZoomFactor);
 }
index 3ba8bc7ea262b53d2df7862ce3de98a34d0c6372..12f0274b9908513e868074c1dfaaebf67deeb949 100644 (file)
@@ -57,8 +57,8 @@ signals:
 public Q_SLOTS:
     // The public slots.
     void applyApplicationSettings();
-    void applyDomainSettingsAndReload() const;
-    void applyDomainSettingsWithoutReloading(const QString &hostname) const;
+    void applyDomainSettingsAndReload();
+    void applyDomainSettingsWithoutReloading(const QString &hostname);
     void applyOnTheFlySearchEngine(QAction *searchEngineActionPointer);
     void applyOnTheFlyUserAgent(QAction *userAgentActionPointer) const;
     void back() const;
@@ -75,6 +75,7 @@ private Q_SLOTS:
 
 private:
     // The private variables.
+    double currentZoomFactor;  // This can be removed once <https://redmine.stoutner.com/issues/799> has been resolved.
     QString searchEngineUrl;
     QWebEngineHistory *webEngineHistoryPointer;
     QWebEngineProfile *webEngineProfilePointer;
@@ -82,6 +83,6 @@ private:
     QWebEngineView *webEngineViewPointer;
 
     // The private functions.
-    void applyDomainSettings(const QString &hostname, const bool reloadWebsite) const;
+    void applyDomainSettings(const QString &hostname, const bool reloadWebsite);
 };
 #endif
index 77bb43b021f112e656da12f42dc731bc9815bcf8..e2dd30109863fe8b8a4a7414aacd3a757ff5afc9 100644 (file)
@@ -130,7 +130,22 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow()
     domainSettingsActionPointer->setText(i18nc("Domain Settings button", "Domain Settings"));
 
     // Set the action icons.
-    //refreshActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
+    userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode"));
+    userAgentFirefoxLinuxActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("firefox-esr")));
+    userAgentChromiumLinuxActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("chromium")));
+    userAgentFirefoxWindowsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("firefox-esr")));
+    userAgentChromeWindowsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("chromium")));
+    userAgentEdgeWindowsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("user-group-properties")));
+    userAgentSafariMacosActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("user-group-properties")));
+    userAgentCustomActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("user-group-properties")));
+    searchEngineMojeekActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+    searchEngineMonoclesActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+    searchEngineMetagerActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+    searchEngineGoogleActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("im-google")));
+    searchEngineBingActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+    searchEngineYahooActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("im-yahoo")));
+    searchEngineCustomActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("search")));
+    zoomFactorActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("zoom")));
     domainSettingsActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("network-server-symbolic")));
 
     // Update the on-the-fly menus.