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

IJHack / QtPass / 43617539964
96%

Build:
DEFAULT BRANCH: main
Ran 14 Nov 2026 04:58PM UTC
Jobs 1
Files 87
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Nov 2026 04:47PM UTC coverage: 96.262% (-0.07%) from 96.333%
43617539964

push

github

web-flow
Password dialog: keep pasted line breaks out of the one-line fields (#2164)

* Password dialog: keep pasted line breaks out of the one-line fields

The password, the template rows and the other field rows are
SecretLineEdits, which for input are plain QLineEdits: they keep the CR and
LF of a paste or a drop and return them from text(). getPassword() writes
each field as one line, so a field's own break ended its line early. A
password pasted as "\nhunter2" (a selection that began at the end of the
line above) was saved as an empty first line with hunter2 below it:
Ctrl+C copied nothing and said "Copied to clipboard", and the password
stood in the text under the fields, also with "Hide password" on.

SecretLineEdit now installs a validator that removes CR and LF and keeps
the cursor behind the character it was behind. QLineEdit runs it on every
change before it reports the text, so the field never holds a break and
the dialog shows what it will save. FieldLabel::finishEdit() removes line
breaks from a new field name, as it removes the colon.

Tests pastedLineBreaksStayOutOfTheEntry (a paste of "\nhunter2", a field
insert of "bob\r\nadmin\r\n", the cursor after a mid-text break) and
fieldNameDropsLineBreaks. Each fails with its part of the fix removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Anne Jan Brouwer <brouwer@annejan.com>

* SecretLineEdit: keep Undo when a paste's line breaks are removed

A correction the validator makes goes through
QWidgetLineControl::internalSetText(), which clears the undo history, so a
paste of "bob\n" over "alice" could not be undone. Ctrl+V (and the other
Paste keys), the context menu's Paste and a middle click now insert the
clipboard text with its line breaks already removed, through insert(),
which records the edit; the validator then has nothing to correct. It stays
for drops and input methods.

Test pasteWithLineBreaksKeepsUndo pastes over a selection by Ctrl+V and by
the context menu... (continued)

48 of 57 new or added lines in 4 files covered. (84.21%)

8422 of 8749 relevant lines covered (96.26%)

469.72 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
78.18
5.6% src/secretlineedit.cpp
1
98.91
-0.21% src/passworddialog.cpp
Jobs
ID Job ID Ran Files Coverage
1 43617539964.1 14 Nov 2026 04:58PM UTC 87
96.26
GitHub Action Run
Source Files on build 43617539964
  • Tree
  • List 87
  • Changed 5
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43617539964
  • 26a09361 on github
  • Prev Build on main (#43611463250)
  • Next Build on main (#43622461796)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc