Skip to content

Highlight reference field in Database view#378

Merged
phoerious merged 3 commits intodevelopfrom
feature/view-references
Mar 7, 2017
Merged

Highlight reference field in Database view#378
phoerious merged 3 commits intodevelopfrom
feature/view-references

Conversation

@TheZ3ro
Copy link
Copy Markdown
Contributor

@TheZ3ro TheZ3ro commented Mar 5, 2017

Description

Highlight reference field in Database view instead of printing the full reference string

Motivation and Context

Printing the full reference field ({REF:U@I:<UUID>) in the database view it's not very user friendly.
Searching also will show reference string instead of the searched content.
This PR shows reference field clearly without hiding the referenced content.

How Has This Been Tested?

Manually

Screenshots (if appropriate):

https://i.imgur.com/6XxwKS3.png

Types of changes

  • ✅ New feature (non-breaking change which adds functionality)

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]

}

QString data = value(key);
QRegExp tmpRegExp("\\{REF:([TUPAN])@I:([^}]+)\\}", Qt::CaseInsensitive, QRegExp::RegExp2);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheZ3ro maybe referenceRegExp?

Copy link
Copy Markdown
Contributor Author

@TheZ3ro TheZ3ro Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@louib fixed with force push

@TheZ3ro TheZ3ro force-pushed the feature/view-references branch from 38637e9 to 7c3ec4f Compare March 6, 2017 17:49
}

QString data = value(key);
QRegExp referenceRegExp("\\{REF:([TUPAN])@I:([^}]+)\\}", Qt::CaseInsensitive, QRegExp::RegExp2);
Copy link
Copy Markdown
Member

@droidmonkey droidmonkey Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend creating this regexp object in the constructor and use that in this function. Creating it for every function call is wasteful since it is not dynamic. This function can be called many times in the course of searching.

@TheZ3ro TheZ3ro force-pushed the feature/view-references branch from d96ff1c to 744c60f Compare March 7, 2017 13:19
@TheZ3ro TheZ3ro force-pushed the feature/view-references branch from 744c60f to 2b208df Compare March 7, 2017 16:20
@TheZ3ro TheZ3ro force-pushed the feature/view-references branch from 2b208df to 4085140 Compare March 7, 2017 16:21
@TheZ3ro
Copy link
Copy Markdown
Contributor Author

TheZ3ro commented Mar 7, 2017

Rebased on top of develop. ping @droidmonkey

return false;
}

QRegExp EntryAttributes::referenceRegExp() const
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should return a reference

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@droidmonkey Fixed ;)

@phoerious phoerious dismissed droidmonkey’s stale review March 7, 2017 21:32

Changes addressed.

@phoerious phoerious added this to the v2.2.0 milestone Mar 7, 2017
@phoerious phoerious merged commit a1e1a33 into develop Mar 7, 2017
@phoerious phoerious deleted the feature/view-references branch March 7, 2017 21:33
droidmonkey added a commit that referenced this pull request Jun 25, 2017
- Added YubiKey 2FA integration for unlocking databases [#127]
- Added TOTP support [#519]
- Added CSV import tool [#146, #490]
- Added KeePassXC CLI tool [#254]
- Added diceware password generator [#373]
- Added support for entry references [#370, #378]
- Added support for Twofish encryption [#167]
- Enabled DEP and ASLR for in-memory protection [#371]
- Enabled single instance mode [#510]
- Enabled portable mode [#645]
- Enabled database lock on screensaver and session lock [#545]
- Redesigned welcome screen with common features and recent databases [#292]
- Multiple updates to search behavior [#168, #213, #374, #471, #603, #654]
- Added auto-type fields {CLEARFIELD}, {SPACE}, {{}, {}} [#267, #427, #480]
- Fixed auto-type errors on Linux [#550]
- Prompt user prior to executing a cmd:// URL [#235]
- Entry attributes can be protected (hidden) [#220]
- Added extended ascii to password generator [#538]
- Added new database icon to toolbar [#289]
- Added context menu entry to empty recycle bin in databases [#520]
- Added "apply" button to entry and group edit windows [#624]
- Added macOS tray icon and enabled minimize on close [#583]
- Fixed issues with unclean shutdowns [#170, #580]
- Changed keyboard shortcut to create new database to CTRL+SHIFT+N [#515]
- Compare window title to entry URLs [#556]
- Implemented inline error messages [#162]
- Ignore group expansion and other minor changes when making database "dirty" [#464]
- Updated license and copyright information on souce files [#632]
- Added contributors list to about dialog [#629]
@phoerious phoerious added pr: new feature Pull request adds a new feature and removed new feature labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: new feature Pull request adds a new feature user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants