]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/CookiesDialog.cpp
Move the Settings Dialog to its own class. https://redmine.stoutner.com/issues/1151
[PrivacyBrowserPC.git] / src / dialogs / CookiesDialog.cpp
index 4ca8c1c63a937c027923fafafec90e1d89b63e98..57e5ed718c770e28b8a86c18fb760945df5cd5f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2022-2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2022-2024 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
  *
@@ -594,10 +594,10 @@ void CookiesDialog::deleteCookieFromDialog(const QNetworkCookie &cookie) const
     emit deleteCookie(cookie);
 }
 
-void CookiesDialog::showAddCookieDialog() const
+void CookiesDialog::showAddCookieDialog()
 {
     // Instantiate an add cookie dialog.
-    QDialog *addCookieDialogPointer = new AddOrEditCookieDialog(AddOrEditCookieDialog::AddCookie);
+    QDialog *addCookieDialogPointer = new AddOrEditCookieDialog(this, AddOrEditCookieDialog::AddCookie);
 
     // Show the dialog.
     addCookieDialogPointer->show();
@@ -744,10 +744,10 @@ void CookiesDialog::showDeleteCookieMessageBox() const
     }
 }
 
-void CookiesDialog::showDurableCookiesDialog() const
+void CookiesDialog::showDurableCookiesDialog()
 {
     // Instantiate a durable cookies dialog.
-    QDialog *durableCookiesDialogPointer = new DurableCookiesDialog();
+    QDialog *durableCookiesDialogPointer = new DurableCookiesDialog(this);
 
     // Show the dialog.
     durableCookiesDialogPointer->show();
@@ -758,7 +758,7 @@ void CookiesDialog::showDurableCookiesDialog() const
     connect(durableCookiesDialogPointer, SIGNAL(updateParentUi()), this, SLOT(updateUi()));
 }
 
-void CookiesDialog::showEditCookieDialog() const
+void CookiesDialog::showEditCookieDialog()
 {
     // Get the current model index.
     QModelIndex currentIndex = treeSelectionModelPointer->currentIndex();
@@ -783,7 +783,7 @@ void CookiesDialog::showEditCookieDialog() const
     }
 
     // Instantiate an edit cookie dialog.
-    QDialog *editCookieDialogPointer = new AddOrEditCookieDialog(AddOrEditCookieDialog::EditCookie, &cookieToEdit, currentIndex.siblingAtColumn(1).data().toString() == i18n("yes"));
+    QDialog *editCookieDialogPointer = new AddOrEditCookieDialog(this, AddOrEditCookieDialog::EditCookie, &cookieToEdit, currentIndex.siblingAtColumn(1).data().toString() == i18n("yes"));
 
     // Show the dialog.
     editCookieDialogPointer->show();