X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.cpp;h=ba12f042d4076bc1cc0bb7e679e47f79f7c15e25;hb=8292f934246cb283e1b0c32f4388c674f275c7aa;hp=3b0ce087949de5f5b3de0bd38ded94451facc743;hpb=0d23ee5e9b43b247cdda0a4cbb73f8b1a70f4500;p=PrivacyBrowserPC.git diff --git a/src/widgets/TabWidget.cpp b/src/widgets/TabWidget.cpp index 3b0ce08..ba12f04 100644 --- a/src/widgets/TabWidget.cpp +++ b/src/widgets/TabWidget.cpp @@ -141,7 +141,7 @@ void TabWidget::addFirstTab() tabWidgetPointer->currentWidget()->setFocus(); } -void TabWidget::addTab() +PrivacyWebEngineView* TabWidget::addTab() { // Create a privacy WebEngine view. PrivacyWebEngineView *privacyWebEngineViewPointer = new PrivacyWebEngineView(); @@ -168,7 +168,6 @@ void TabWidget::addTab() // Update the URL line edit when the URL changes. connect(privacyWebEngineViewPointer, SIGNAL(urlChanged(const QUrl)), this, SLOT(updateUrl(const QUrl))); - // Update the progress bar. connect(privacyWebEngineViewPointer, SIGNAL(loadStarted()), this, SLOT(loadStarted())); connect(privacyWebEngineViewPointer, SIGNAL(loadProgress(const int)), this, SLOT(loadProgress(const int))); @@ -290,6 +289,9 @@ void TabWidget::addTab() // Move to the new tab. tabWidgetPointer->setCurrentIndex(newTabIndex); + + // Return the privacy WebEngine view pointer. + return privacyWebEngineViewPointer; } void TabWidget::applyApplicationSettings() @@ -449,9 +451,9 @@ void TabWidget::applyDomainSettings(const QString &hostname, const bool reloadWe currentWebEngineSettingsPointer->setAttribute(QWebEngineSettings::JavascriptEnabled, Settings::javaScriptEnabled()); // Set the local storage status. - //currentPrivacyWebEngineViewPointer->localStorageEnabled = Settings::localStorageEnabled(); + currentPrivacyWebEngineViewPointer->localStorageEnabled = Settings::localStorageEnabled(); - // Set DOM storage. + // Set DOM storage. In QWebEngineSettings it is called Local Storage. currentWebEngineSettingsPointer->setAttribute(QWebEngineSettings::LocalStorageEnabled, Settings::domStorageEnabled()); // Set the user agent.