tabWidgetPointer->currentWidget()->setFocus();
}
-void TabWidget::addTab()
+PrivacyWebEngineView* TabWidget::addTab()
{
// Create a privacy WebEngine view.
PrivacyWebEngineView *privacyWebEngineViewPointer = new PrivacyWebEngineView();
// 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)));
// Move to the new tab.
tabWidgetPointer->setCurrentIndex(newTabIndex);
+
+ // Return the privacy WebEngine view pointer.
+ return privacyWebEngineViewPointer;
}
void TabWidget::applyApplicationSettings()
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.