summaryrefslogtreecommitdiff
path: root/overlays/keepassxc/database-open-dialog.patch
blob: dff84846781d627918836892a78cf876382eea11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp
index 60412b5a..c0497d91 100644
--- a/src/browser/BrowserService.cpp
+++ b/src/browser/BrowserService.cpp
@@ -249,7 +249,7 @@ QJsonObject BrowserService::createNewGroup(const QString& groupName)
         return result;
     }
 
-    auto dialogResult = MessageBox::warning(m_currentDatabaseWidget,
+    auto dialogResult = MessageBox::warning(nullptr,
                                             tr("KeePassXC - Create a new group"),
                                             tr("A request for creating a new group \"%1\" has been received.\n"
                                                "Do you want to create this group?\n")
@@ -422,7 +422,7 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& entriesToConfirm,
 
     m_dialogActive = true;
     updateWindowState();
-    BrowserAccessControlDialog accessControlDialog(m_currentDatabaseWidget);
+    BrowserAccessControlDialog accessControlDialog{};
 
     connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &accessControlDialog, SLOT(reject()));
 
@@ -512,7 +512,7 @@ QString BrowserService::storeKey(const QString& key)
     QString id;
 
     do {
-        QInputDialog keyDialog(m_currentDatabaseWidget);
+        QInputDialog keyDialog{};
         connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &keyDialog, SLOT(reject()));
         keyDialog.setWindowTitle(tr("KeePassXC - New key association request"));
         keyDialog.setLabelText(tr("You have received an association request for the following database:\n%1\n\n"
@@ -535,7 +535,7 @@ QString BrowserService::storeKey(const QString& key)
 
         contains = db->metadata()->customData()->contains(CustomData::BrowserKeyPrefix + id);
         if (contains) {
-            dialogResult = MessageBox::warning(m_currentDatabaseWidget,
+            dialogResult = MessageBox::warning(nullptr,
                                                tr("KeePassXC - Overwrite existing key?"),
                                                tr("A shared encryption key with the name \"%1\" "
                                                   "already exists.\nDo you want to overwrite it?")
@@ -595,7 +595,7 @@ QJsonObject BrowserService::showPasskeysRegisterPrompt(const QJsonObject& public
     const auto existingEntries = getPasskeyEntriesWithUserHandle(rpId, userId, keyList);
 
     raiseWindow();
-    BrowserPasskeysConfirmationDialog confirmDialog(m_currentDatabaseWidget);
+    BrowserPasskeysConfirmationDialog confirmDialog{};
     confirmDialog.registerCredential(username, rpId, existingEntries, timeout);
 
     auto dialogResult = confirmDialog.exec();
@@ -612,7 +612,7 @@ QJsonObject BrowserService::showPasskeysRegisterPrompt(const QJsonObject& public
             // If no entry is selected, show the import dialog for manual entry selection
             auto selectedEntry = confirmDialog.getSelectedEntry();
             if (!selectedEntry) {
-                PasskeyImporter passkeyImporter(m_currentDatabaseWidget);
+	        PasskeyImporter passkeyImporter{};
                 const auto result = passkeyImporter.showImportDialog(db,
                                                                      nullptr,
                                                                      origin,
@@ -683,7 +683,7 @@ QJsonObject BrowserService::showPasskeysAuthenticationPrompt(const QJsonObject&
     const auto timeout = publicKeyOptions["timeout"].toInt();
 
     raiseWindow();
-    BrowserPasskeysConfirmationDialog confirmDialog(m_currentDatabaseWidget);
+    BrowserPasskeysConfirmationDialog confirmDialog{};
     confirmDialog.authenticateCredential(entries, rpId, timeout);
     auto dialogResult = confirmDialog.exec();
     if (dialogResult == QDialog::Accepted) {
@@ -760,7 +760,7 @@ void BrowserService::addPasskeyToEntry(Entry* entry,
 
     // Ask confirmation if entry already contains a Passkey
     if (entry->hasPasskey()) {
-        if (MessageBox::question(m_currentDatabaseWidget,
+        if (MessageBox::question(nullptr,
                                  tr("KeePassXC - Update passkey"),
                                  tr("Entry already has a passkey.\nDo you want to overwrite the passkey in %1 - %2?")
                                      .arg(entry->title(), passkeyUtils()->getUsernameFromEntry(entry)),
@@ -873,7 +873,7 @@ bool BrowserService::updateEntry(const EntryParameters& entryParameters, const Q
         MessageBox::Button dialogResult = MessageBox::No;
         if (!browserSettings()->alwaysAllowUpdate()) {
             raiseWindow();
-            dialogResult = MessageBox::question(m_currentDatabaseWidget,
+            dialogResult = MessageBox::question(nullptr,
                                                 tr("KeePassXC - Update Entry"),
                                                 tr("Do you want to update the information in %1 - %2?")
                                                     .arg(QUrl(entryParameters.siteUrl).host(), username),
@@ -909,7 +909,7 @@ bool BrowserService::deleteEntry(const QString& uuid)
         return false;
     }
 
-    auto dialogResult = MessageBox::warning(m_currentDatabaseWidget,
+    auto dialogResult = MessageBox::warning(nullptr,
                                             tr("KeePassXC - Delete entry"),
                                             tr("A request for deleting entry \"%1\" has been received.\n"
                                                "Do you want to delete the entry?\n")
@@ -1536,7 +1536,7 @@ QSharedPointer<Database> BrowserService::selectedDatabase()
         }
     }
 
-    BrowserEntrySaveDialog browserEntrySaveDialog(m_currentDatabaseWidget);
+    BrowserEntrySaveDialog browserEntrySaveDialog{};
     int openDatabaseCount = browserEntrySaveDialog.setItems(databaseWidgets, m_currentDatabaseWidget);
     if (openDatabaseCount > 1) {
         int res = browserEntrySaveDialog.exec();
diff --git a/src/fdosecrets/objects/Prompt.cpp b/src/fdosecrets/objects/Prompt.cpp
index e89cd499..347c98b8 100644
--- a/src/fdosecrets/objects/Prompt.cpp
+++ b/src/fdosecrets/objects/Prompt.cpp
@@ -313,7 +313,7 @@ namespace FdoSecrets
         if (!entries.isEmpty()) {
             QString app = tr("%1 (PID: %2)").arg(client->name()).arg(client->pid());
             auto ac = new AccessControlDialog(
-                findWindow(m_windowId), entries, app, client->processInfo(), AuthOption::Remember);
+                nullptr, entries, app, client->processInfo(), AuthOption::Remember);
             connect(ac, &AccessControlDialog::finished, this, &UnlockPrompt::itemUnlockFinished);
             connect(ac, &AccessControlDialog::finished, ac, &AccessControlDialog::deleteLater);
             ac->open();
diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp
index 805d4eab..4836199e 100644
--- a/src/gui/DatabaseTabWidget.cpp
+++ b/src/gui/DatabaseTabWidget.cpp
@@ -41,7 +41,7 @@ DatabaseTabWidget::DatabaseTabWidget(QWidget* parent)
     : QTabWidget(parent)
     , m_dbWidgetStateSync(new DatabaseWidgetStateSync(this))
     , m_dbWidgetPendingLock(nullptr)
-    , m_databaseOpenDialog(new DatabaseOpenDialog(this))
+    , m_databaseOpenDialog(new DatabaseOpenDialog())
     , m_databaseOpenInProgress(false)
 {
     auto* tabBar = new QTabBar(this);