+
+ // Get the index for this tab.
+ int tabIndex = qTabWidgetPointer->indexOf(privacyWebEngineViewPointer);
+
+ // Display the current favorite icon
+ qTabWidgetPointer->setTabIcon(tabIndex, privacyWebEngineViewPointer->favoriteIcon);
+
+ // Create a no tabs loading variable.
+ bool noTabsLoading = true;
+
+ // Get the number of tabs.
+ int numberOfTabs = qTabWidgetPointer->count();
+
+ // Check to see if any other tabs are loading.
+ for (int i = 0; i < numberOfTabs; i++)
+ {
+ // Get the privacy WebEngine view for the tab.
+ PrivacyWebEngineView *privacyWebEngineViewPointer = qobject_cast<PrivacyWebEngineView*>(qTabWidgetPointer->widget(i));
+
+ // Check to see if it is currently loading. If at least one tab is loading, this flag will end up being marked `false` when the for loop has finished.
+ if (privacyWebEngineViewPointer->isLoading)
+ noTabsLoading = false;
+ }
+
+ // Stop the loading favorite icon movie if there are no loading tabs.
+ if (noTabsLoading)
+ loadingFavoriteIconMoviePointer->stop();
+ });
+
+ // Display HTTP Ping blocked dialogs.
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::displayHttpPingBlockedDialog, [this, privacyWebEngineViewPointer] (const QString &httpPingUrl)
+ {
+ // Only display the HTTP Ping blocked dialog if this is the current tab.
+ if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
+ {
+ // Instantiate an HTTP ping blocked message box.
+ QMessageBox httpPingBlockedMessageBox;
+
+ // Set the icon.
+ httpPingBlockedMessageBox.setIcon(QMessageBox::Information);
+
+ // Set the window title.
+ httpPingBlockedMessageBox.setWindowTitle(i18nc("HTTP Ping blocked dialog title", "HTTP Ping Blocked"));
+
+ // Set the text.
+ httpPingBlockedMessageBox.setText(i18nc("HTTP Ping blocked dialog text", "This request has been blocked because it sends a naughty HTTP ping to %1.", httpPingUrl));
+
+ // Set the standard button.
+ httpPingBlockedMessageBox.setStandardButtons(QMessageBox::Ok);
+
+ // Display the message box.
+ httpPingBlockedMessageBox.exec();
+ }
+ });
+
+ // Update the zoom actions when changed by CTRL-Scrolling. This can be modified when <https://redmine.stoutner.com/issues/845> is fixed.
+ connect(webEnginePagePointer, &QWebEnginePage::contentsSizeChanged, [webEnginePagePointer, this] ()
+ {
+ // Only update the zoom actions if this is the current tab.
+ if (webEnginePagePointer == currentWebEnginePagePointer)
+ emit updateZoomActions(webEnginePagePointer->zoomFactor());