diff options
Diffstat (limited to 'overlays/keepassxc')
| -rw-r--r-- | overlays/keepassxc/database-open-dialog.patch | 129 | ||||
| -rw-r--r-- | overlays/keepassxc/default.nix | 113 |
2 files changed, 0 insertions, 242 deletions
diff --git a/overlays/keepassxc/database-open-dialog.patch b/overlays/keepassxc/database-open-dialog.patch deleted file mode 100644 index dff84846..00000000 --- a/overlays/keepassxc/database-open-dialog.patch +++ /dev/null | |||
| @@ -1,129 +0,0 @@ | |||
| 1 | diff --git a/src/browser/BrowserService.cpp b/src/browser/BrowserService.cpp | ||
| 2 | index 60412b5a..c0497d91 100644 | ||
| 3 | --- a/src/browser/BrowserService.cpp | ||
| 4 | +++ b/src/browser/BrowserService.cpp | ||
| 5 | @@ -249,7 +249,7 @@ QJsonObject BrowserService::createNewGroup(const QString& groupName) | ||
| 6 | return result; | ||
| 7 | } | ||
| 8 | |||
| 9 | - auto dialogResult = MessageBox::warning(m_currentDatabaseWidget, | ||
| 10 | + auto dialogResult = MessageBox::warning(nullptr, | ||
| 11 | tr("KeePassXC - Create a new group"), | ||
| 12 | tr("A request for creating a new group \"%1\" has been received.\n" | ||
| 13 | "Do you want to create this group?\n") | ||
| 14 | @@ -422,7 +422,7 @@ QList<Entry*> BrowserService::confirmEntries(QList<Entry*>& entriesToConfirm, | ||
| 15 | |||
| 16 | m_dialogActive = true; | ||
| 17 | updateWindowState(); | ||
| 18 | - BrowserAccessControlDialog accessControlDialog(m_currentDatabaseWidget); | ||
| 19 | + BrowserAccessControlDialog accessControlDialog{}; | ||
| 20 | |||
| 21 | connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &accessControlDialog, SLOT(reject())); | ||
| 22 | |||
| 23 | @@ -512,7 +512,7 @@ QString BrowserService::storeKey(const QString& key) | ||
| 24 | QString id; | ||
| 25 | |||
| 26 | do { | ||
| 27 | - QInputDialog keyDialog(m_currentDatabaseWidget); | ||
| 28 | + QInputDialog keyDialog{}; | ||
| 29 | connect(m_currentDatabaseWidget, SIGNAL(databaseLockRequested()), &keyDialog, SLOT(reject())); | ||
| 30 | keyDialog.setWindowTitle(tr("KeePassXC - New key association request")); | ||
| 31 | keyDialog.setLabelText(tr("You have received an association request for the following database:\n%1\n\n" | ||
| 32 | @@ -535,7 +535,7 @@ QString BrowserService::storeKey(const QString& key) | ||
| 33 | |||
| 34 | contains = db->metadata()->customData()->contains(CustomData::BrowserKeyPrefix + id); | ||
| 35 | if (contains) { | ||
| 36 | - dialogResult = MessageBox::warning(m_currentDatabaseWidget, | ||
| 37 | + dialogResult = MessageBox::warning(nullptr, | ||
| 38 | tr("KeePassXC - Overwrite existing key?"), | ||
| 39 | tr("A shared encryption key with the name \"%1\" " | ||
| 40 | "already exists.\nDo you want to overwrite it?") | ||
| 41 | @@ -595,7 +595,7 @@ QJsonObject BrowserService::showPasskeysRegisterPrompt(const QJsonObject& public | ||
| 42 | const auto existingEntries = getPasskeyEntriesWithUserHandle(rpId, userId, keyList); | ||
| 43 | |||
| 44 | raiseWindow(); | ||
| 45 | - BrowserPasskeysConfirmationDialog confirmDialog(m_currentDatabaseWidget); | ||
| 46 | + BrowserPasskeysConfirmationDialog confirmDialog{}; | ||
| 47 | confirmDialog.registerCredential(username, rpId, existingEntries, timeout); | ||
| 48 | |||
| 49 | auto dialogResult = confirmDialog.exec(); | ||
| 50 | @@ -612,7 +612,7 @@ QJsonObject BrowserService::showPasskeysRegisterPrompt(const QJsonObject& public | ||
| 51 | // If no entry is selected, show the import dialog for manual entry selection | ||
| 52 | auto selectedEntry = confirmDialog.getSelectedEntry(); | ||
| 53 | if (!selectedEntry) { | ||
| 54 | - PasskeyImporter passkeyImporter(m_currentDatabaseWidget); | ||
| 55 | + PasskeyImporter passkeyImporter{}; | ||
| 56 | const auto result = passkeyImporter.showImportDialog(db, | ||
| 57 | nullptr, | ||
| 58 | origin, | ||
| 59 | @@ -683,7 +683,7 @@ QJsonObject BrowserService::showPasskeysAuthenticationPrompt(const QJsonObject& | ||
| 60 | const auto timeout = publicKeyOptions["timeout"].toInt(); | ||
| 61 | |||
| 62 | raiseWindow(); | ||
| 63 | - BrowserPasskeysConfirmationDialog confirmDialog(m_currentDatabaseWidget); | ||
| 64 | + BrowserPasskeysConfirmationDialog confirmDialog{}; | ||
| 65 | confirmDialog.authenticateCredential(entries, rpId, timeout); | ||
| 66 | auto dialogResult = confirmDialog.exec(); | ||
| 67 | if (dialogResult == QDialog::Accepted) { | ||
| 68 | @@ -760,7 +760,7 @@ void BrowserService::addPasskeyToEntry(Entry* entry, | ||
| 69 | |||
| 70 | // Ask confirmation if entry already contains a Passkey | ||
| 71 | if (entry->hasPasskey()) { | ||
| 72 | - if (MessageBox::question(m_currentDatabaseWidget, | ||
| 73 | + if (MessageBox::question(nullptr, | ||
| 74 | tr("KeePassXC - Update passkey"), | ||
| 75 | tr("Entry already has a passkey.\nDo you want to overwrite the passkey in %1 - %2?") | ||
| 76 | .arg(entry->title(), passkeyUtils()->getUsernameFromEntry(entry)), | ||
| 77 | @@ -873,7 +873,7 @@ bool BrowserService::updateEntry(const EntryParameters& entryParameters, const Q | ||
| 78 | MessageBox::Button dialogResult = MessageBox::No; | ||
| 79 | if (!browserSettings()->alwaysAllowUpdate()) { | ||
| 80 | raiseWindow(); | ||
| 81 | - dialogResult = MessageBox::question(m_currentDatabaseWidget, | ||
| 82 | + dialogResult = MessageBox::question(nullptr, | ||
| 83 | tr("KeePassXC - Update Entry"), | ||
| 84 | tr("Do you want to update the information in %1 - %2?") | ||
| 85 | .arg(QUrl(entryParameters.siteUrl).host(), username), | ||
| 86 | @@ -909,7 +909,7 @@ bool BrowserService::deleteEntry(const QString& uuid) | ||
| 87 | return false; | ||
| 88 | } | ||
| 89 | |||
| 90 | - auto dialogResult = MessageBox::warning(m_currentDatabaseWidget, | ||
| 91 | + auto dialogResult = MessageBox::warning(nullptr, | ||
| 92 | tr("KeePassXC - Delete entry"), | ||
| 93 | tr("A request for deleting entry \"%1\" has been received.\n" | ||
| 94 | "Do you want to delete the entry?\n") | ||
| 95 | @@ -1536,7 +1536,7 @@ QSharedPointer<Database> BrowserService::selectedDatabase() | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | - BrowserEntrySaveDialog browserEntrySaveDialog(m_currentDatabaseWidget); | ||
| 100 | + BrowserEntrySaveDialog browserEntrySaveDialog{}; | ||
| 101 | int openDatabaseCount = browserEntrySaveDialog.setItems(databaseWidgets, m_currentDatabaseWidget); | ||
| 102 | if (openDatabaseCount > 1) { | ||
| 103 | int res = browserEntrySaveDialog.exec(); | ||
| 104 | diff --git a/src/fdosecrets/objects/Prompt.cpp b/src/fdosecrets/objects/Prompt.cpp | ||
| 105 | index e89cd499..347c98b8 100644 | ||
| 106 | --- a/src/fdosecrets/objects/Prompt.cpp | ||
| 107 | +++ b/src/fdosecrets/objects/Prompt.cpp | ||
| 108 | @@ -313,7 +313,7 @@ namespace FdoSecrets | ||
| 109 | if (!entries.isEmpty()) { | ||
| 110 | QString app = tr("%1 (PID: %2)").arg(client->name()).arg(client->pid()); | ||
| 111 | auto ac = new AccessControlDialog( | ||
| 112 | - findWindow(m_windowId), entries, app, client->processInfo(), AuthOption::Remember); | ||
| 113 | + nullptr, entries, app, client->processInfo(), AuthOption::Remember); | ||
| 114 | connect(ac, &AccessControlDialog::finished, this, &UnlockPrompt::itemUnlockFinished); | ||
| 115 | connect(ac, &AccessControlDialog::finished, ac, &AccessControlDialog::deleteLater); | ||
| 116 | ac->open(); | ||
| 117 | diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp | ||
| 118 | index 805d4eab..4836199e 100644 | ||
| 119 | --- a/src/gui/DatabaseTabWidget.cpp | ||
| 120 | +++ b/src/gui/DatabaseTabWidget.cpp | ||
| 121 | @@ -41,7 +41,7 @@ DatabaseTabWidget::DatabaseTabWidget(QWidget* parent) | ||
| 122 | : QTabWidget(parent) | ||
| 123 | , m_dbWidgetStateSync(new DatabaseWidgetStateSync(this)) | ||
| 124 | , m_dbWidgetPendingLock(nullptr) | ||
| 125 | - , m_databaseOpenDialog(new DatabaseOpenDialog(this)) | ||
| 126 | + , m_databaseOpenDialog(new DatabaseOpenDialog()) | ||
| 127 | , m_databaseOpenInProgress(false) | ||
| 128 | { | ||
| 129 | auto* tabBar = new QTabBar(this); | ||
diff --git a/overlays/keepassxc/default.nix b/overlays/keepassxc/default.nix deleted file mode 100644 index 325f1aa4..00000000 --- a/overlays/keepassxc/default.nix +++ /dev/null | |||
| @@ -1,113 +0,0 @@ | |||
| 1 | { final, prev, flakeInputs, ... }: | ||
| 2 | { | ||
| 3 | keepassxc = final.stdenv.mkDerivation (finalAttrs: { | ||
| 4 | pname = "keepassxc"; | ||
| 5 | version = "2.8.0-beta1"; | ||
| 6 | |||
| 7 | src = final.fetchFromGitHub { | ||
| 8 | owner = "keepassxreboot"; | ||
| 9 | repo = "keepassxc"; | ||
| 10 | tag = finalAttrs.version; | ||
| 11 | hash = "sha256-fksThYmGZed66zxGDxlS2SHQzJYRf+T9AuZPbaNZV5Y="; | ||
| 12 | }; | ||
| 13 | |||
| 14 | env = | ||
| 15 | final.lib.optionalAttrs final.stdenv.cc.isClang { | ||
| 16 | NIX_CFLAGS_COMPILE = toString [ | ||
| 17 | "-Wno-old-style-cast" | ||
| 18 | "-Wno-error" | ||
| 19 | "-D__BIG_ENDIAN__=${if final.stdenv.hostPlatform.isBigEndian then "1" else "0"}" | ||
| 20 | ]; | ||
| 21 | }; | ||
| 22 | |||
| 23 | # Upstream develops against a build of PCSC from Xcode. | ||
| 24 | # The types are incompatible with nixpkgs pcsclite. | ||
| 25 | # https://github.com/NixOS/nixpkgs/issues/520227 | ||
| 26 | postPatch = '' | ||
| 27 | substituteInPlace src/keys/drivers/YubiKeyInterfacePCSC.cpp \ | ||
| 28 | --replace-fail "typedef uint32_t RETVAL;" "typedef int32_t RETVAL;" | ||
| 29 | ''; | ||
| 30 | |||
| 31 | cmakeFlags = [ | ||
| 32 | (final.lib.cmakeFeature "KEEPASSXC_BUILD_TYPE" "Release") | ||
| 33 | (final.lib.cmakeBool "WITH_GUI_TESTS" true) | ||
| 34 | (final.lib.cmakeBool "WITH_XC_UPDATECHECK" false) | ||
| 35 | (final.lib.cmakeBool "WITH_XC_X11" false) | ||
| 36 | (final.lib.cmakeBool "WITH_XC_BROWSER" true) | ||
| 37 | (final.lib.cmakeBool "WITH_XC_BROWSER_PASSKEYS" true) | ||
| 38 | (final.lib.cmakeBool "WITH_XC_KEESHARE" true) | ||
| 39 | (final.lib.cmakeBool "WITH_XC_NETWORKING" true) | ||
| 40 | (final.lib.cmakeBool "WITH_XC_SSHAGENT" true) | ||
| 41 | (final.lib.cmakeBool "WITH_XC_FDOSECRETS" true) | ||
| 42 | (final.lib.cmakeBool "WITH_XC_YUBIKEY" true) | ||
| 43 | ]; | ||
| 44 | |||
| 45 | doCheck = true; | ||
| 46 | checkPhase = | ||
| 47 | let | ||
| 48 | disabledTests = final.lib.concatStringsSep "|" ( | ||
| 49 | [ | ||
| 50 | # flaky | ||
| 51 | "testcli" | ||
| 52 | "testgui" | ||
| 53 | ] | ||
| 54 | ); | ||
| 55 | in | ||
| 56 | '' | ||
| 57 | runHook preCheck | ||
| 58 | |||
| 59 | export LC_ALL="en_US.UTF-8" | ||
| 60 | export QT_QPA_PLATFORM=offscreen | ||
| 61 | export QT_PLUGIN_PATH="${final.qt6.qtbase}/${final.qt6.qtbase.qtPluginPrefix}" | ||
| 62 | |||
| 63 | make test ARGS+="-E '${disabledTests}' --output-on-failure" | ||
| 64 | |||
| 65 | runHook postCheck | ||
| 66 | ''; | ||
| 67 | |||
| 68 | nativeBuildInputs = with final; [ | ||
| 69 | asciidoctor | ||
| 70 | cmake | ||
| 71 | qt6.wrapQtAppsHook | ||
| 72 | qt6.qttools | ||
| 73 | pkg-config | ||
| 74 | wrapGAppsHook3 | ||
| 75 | ]; | ||
| 76 | |||
| 77 | dontWrapGApps = true; | ||
| 78 | preFixup = '' | ||
| 79 | qtWrapperArgs+=("''${gappsWrapperArgs[@]}") | ||
| 80 | ''; | ||
| 81 | |||
| 82 | postInstall = final.lib.concatLines [ | ||
| 83 | # See https://github.com/keepassxreboot/keepassxc/blob/cd7a53abbbb81e468efb33eb56eefc12739969b8/src/browser/NativeMessageInstaller.cpp#L317 | ||
| 84 | # See https://github.com/keepassxreboot/keepassxc/blob/cd7a53abbbb81e468efb33eb56eefc12739969b8/utils/keepassxc-snap-helper.sh#L48-L58 | ||
| 85 | '' | ||
| 86 | mkdir -p "$out/lib/mozilla/native-messaging-hosts" | ||
| 87 | substituteAll "${toString (flakeInputs.nixpkgs) + "/pkgs/by-name/ke/keepassxc/firefox-native-messaging-host.json"}" "$out/lib/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json" | ||
| 88 | |||
| 89 | mkdir -p "$out/etc/chromium/native-messaging-hosts" | ||
| 90 | substituteAll "${toString (flakeInputs.nixpkgs) + "/pkgs/by-name/ke/keepassxc/chromium-native-messaging-host.json"}" "$out/etc/chromium/native-messaging-hosts/org.keepassxc.keepassxc_browser.json" | ||
| 91 | '' | ||
| 92 | ]; | ||
| 93 | |||
| 94 | buildInputs = with final; [ | ||
| 95 | botan3 | ||
| 96 | curl | ||
| 97 | libxi | ||
| 98 | libxtst | ||
| 99 | libargon2 | ||
| 100 | qt6.qtbase | ||
| 101 | qt6.qtsvg | ||
| 102 | minizip | ||
| 103 | pcsclite | ||
| 104 | qrencode | ||
| 105 | readline | ||
| 106 | zlib | ||
| 107 | libusb1 | ||
| 108 | keyutils | ||
| 109 | ]; | ||
| 110 | |||
| 111 | meta.mainProgram = "keepassxc"; | ||
| 112 | }); | ||
| 113 | } | ||
