• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IJHack / QtPass / 24940894757

25 Apr 2026 09:18PM UTC coverage: 28.024% (+0.4%) from 27.609%
24940894757

push

github

web-flow
feat: add Import key dialog to UsersDialog for issue #1167 (#1170)

* feat: add Import key dialog to UsersDialog for issue #1167

- Add ImportKeyDialog class for importing GPG keys from file or clipboard
- Add Import key button to UsersDialog next to search
- Wire up gpg --import execution
- On success, refresh key list and select newly imported key
- Use --status-fd for machine-readable output
- Parse multiline gpg output correctly (line-by-line)
- Fix QDialogButtonBox to only have Cancel button
- Move on_importKeyButton_clicked to private slots
- Clear filter before showing new key (leave cleared after import)
- Add gpgExe fallback to gpg
- Fix clang-format issues

* fix: address review feedback on Import key dialog

Locale-aware parsing, naming, UX, and tests:

- Rename ImportKeyDialog::importedKeyFingerprint() to importedKeyId()
  and update the lone caller in UsersDialog. The parser returns whatever
  gpg gave us (fingerprint when --status-fd's IMPORT_OK is present,
  long key id when only IMPORTED is, the human-readable token
  otherwise); the new name matches m_importedKeyId and the surrounding
  documentation.

- parseGpgImportOutput now prefers locale-independent status lines:
  [GNUPG:] IMPORT_OK <reason> <fingerprint> first, [GNUPG:] IMPORTED
  <keyid> next, falling back to the English-locale "gpg: key X:
  imported" line. Drops the redundant KEY_IMPORTED_EXACT regex (the
  generalised one matched the same inputs).

- Stop wiping inputTextEdit when the clipboard is empty in
  on_pasteButton_clicked.

- Reject non-armored files in on_fileButton_clicked instead of
  silently corrupting binary keyrings through QString::fromUtf8.
  File picker now advertises ASCII-armored only (*.asc); users with
  binary keys are pointed at gpg --armor --export or the From
  Clipboard path.

- Drop the redundant ui->inputTextEdit->setPlaceholderText() runtime
  set; the .ui already declares it, so translators only see the
  string once.

- UsersDialog::on_impo... (continued)

25 of 113 new or added lines in 3 files covered. (22.12%)

36 existing lines in 2 files now uncovered.

1805 of 6441 relevant lines covered (28.02%)

27.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/moc_usersdialog.cpp


Source Not Available

The file "src/moc_usersdialog.cpp" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc