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

IJHack / QtPass / 27472855302

13 Jun 2026 04:45PM UTC coverage: 55.376% (-0.04%) from 55.418%
27472855302

push

github

web-flow
feat: add "Open in browser" button for web URLs (#1516) (#1517)

* feat: add "Open in browser" button for web URLs (#1516)

Adds a discoverable per-field button that opens an entry's http(s) URL
in the default browser via QDesktopServices::openUrl, next to the
existing copy/QR buttons. Requested in #1516: a non-technical user
wants a visible affordance to reach a login page (autofill is then
handled by a browser extension such as browserpass).

URLs were already clickable inline (#226) via protocolRegex +
QTextBrowser::setOpenExternalLinks; this adds the obvious button most
users expect, and handles the discoverability gap.

Security: the button is gated by a new strict validator
Util::isLaunchableWebUrl() — deliberately stricter than protocolRegex
(which also allows ftp/ssh/webdav, fine for a click-through link but
too loose for a launch primitive). It accepts only:
- no control chars (CR/LF/NUL checked before QUrl parsing),
- valid QUrl with scheme exactly http/https (case-insensitive),
- non-empty host,
- no embedded userinfo (user:pass@host).
It rejects file://, javascript:, data:, ftp/ssh/webdav and scheme-less
inputs. The click handler re-validates before openUrl (defence in
depth). The permissive protocolRegex display path is unchanged.

The button only renders when the whole field value passes the
validator, so it never appears for non-web fields; URLs embedded in
prose keep the existing inline clickable link. No new setting (always
on for valid web URLs).

- src/util.{h,cpp}: Util::isLaunchableWebUrl validator (+ <QUrl>).
- src/mainwindow.cpp: render the button in addToGridLayout, themed
  "applications-internet" icon with bundled open-url.svg fallback,
  tooltip showing the full URL, pointing-hand cursor.
- icons/open-url.svg + resources.qrc: bundled fallback icon.
- tests/auto/util/tst_util.cpp: isLaunchableWebUrl accept/reject cases
  (http/https, uppercase scheme, whitespace; reject ftp/ssh/file/
  javascript/data/scheme-less/creds/CRLF/N... (continued)

11 of 25 new or added lines in 2 files covered. (44.0%)

18 existing lines in 2 files now uncovered.

3739 of 6752 relevant lines covered (55.38%)

36.67 hits per line

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

0.0
/src/qrc_resources.cpp


Source Not Available

The file "src/qrc_resources.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