X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FTabWidget.cpp;h=84cd3aca089de34bcd188e3e5baa006508254595;hb=e715eca23297fb10dcf70e4c8bb2712413d16e3d;hp=dd11a6776c0f0fdc798fe4492879ff2ce5a84a08;hpb=425fed98271cd951cddef9904e5e271f0fb76fc1;p=PrivacyBrowserPC.git diff --git a/src/widgets/TabWidget.cpp b/src/widgets/TabWidget.cpp index dd11a67..84cd3ac 100644 --- a/src/widgets/TabWidget.cpp +++ b/src/widgets/TabWidget.cpp @@ -673,6 +673,24 @@ std::list* TabWidget::getCookieList() const return currentPrivacyWebEngineViewPointer->cookieListPointer; } +QIcon TabWidget::getCurrentTabFavoritIcon() const +{ + // Return the current Privacy WebEngine favorite icon. + return currentPrivacyWebEngineViewPointer->favoriteIcon; +} + +QString TabWidget::getCurrentTabTitle() const +{ + // Return the current Privacy WebEngine title. + return currentPrivacyWebEngineViewPointer->title(); +} + +QString TabWidget::getCurrentTabUrl() const +{ + // Return the current Privacy WebEngine URL as a string. + return currentPrivacyWebEngineViewPointer->url().toString(); +} + QString& TabWidget::getDomainSettingsName() const { // Return the domain settings name. @@ -918,9 +936,6 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin // Prevent the notification from being autodeleted if it is closed. Otherwise, the updates to the notification below cause a crash. fileDownloadNotificationPointer->setAutoDelete(false); - // Display the notification. - fileDownloadNotificationPointer->sendEvent(); - // Handle clicks on the cancel button. connect(fileDownloadNotificationPointer, &KNotification::action1Activated, [webEngineDownloadItemPointer, saveFileName] () { @@ -985,6 +1000,9 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin fileDownloadNotificationPointer->update(); }); + // Display the notification. + fileDownloadNotificationPointer->sendEvent(); + // Start the download. webEngineDownloadItemPointer->accept(); }