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