]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/widgets/TabWidget.cpp
Additional fix for notifications on Xfce. https://redmine.stoutner.com/issues/1017
[PrivacyBrowserPC.git] / src / widgets / TabWidget.cpp
index 2f4582a9b2e6943af0b7c32982823315ae400aa0..84cd3aca089de34bcd188e3e5baa006508254595 100644 (file)
@@ -936,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] ()
                 {
@@ -1003,6 +1000,9 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin
                     fileDownloadNotificationPointer->update();
                 });
 
+                // Display the notification.
+                fileDownloadNotificationPointer->sendEvent();
+
                 // Start the download.
                 webEngineDownloadItemPointer->accept();
             }