Skip to content

Correct multiple issues with custom icons#994

Merged
droidmonkey merged 1 commit intorelease/2.2.1from
hotfix/unique-icons
Sep 29, 2017
Merged

Correct multiple issues with custom icons#994
droidmonkey merged 1 commit intorelease/2.2.1from
hotfix/unique-icons

Conversation

@droidmonkey
Copy link
Copy Markdown
Member

Description

Provides multiple fixes to reported bugs against custom icon loading.

The way I implemented the unique icon hashing ensures that existing databases with multiple unique icons already are not impacted.

How has this been tested?

Manually with several websites.

Types of changes

  • ✅ Bug fix (non-breaking change which fixes an issue)

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]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]

@droidmonkey droidmonkey added this to the v2.2.1 milestone Sep 24, 2017
// Remove hash record only if this is the same uuid
QByteArray hash = hashImage(m_customIcons[uuid]);
if (m_customIconsHashes.contains(hash) && m_customIconsHashes[hash] == uuid)
m_customIconsHashes.remove(hash);
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.

@droidmonkey no braces?

Copy link
Copy Markdown
Member Author

@droidmonkey droidmonkey Sep 26, 2017

Choose a reason for hiding this comment

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

Noted. And corrected.

Copy link
Copy Markdown
Contributor

@TheZ3ro TheZ3ro left a comment

Choose a reason for hiding this comment

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

Code seems fine, works good too

if (uuid.isNull()) {
uuid = Uuid::random();
// Don't add an icon larger than 128x128, but retain original size if smaller
if (icon.width() > 128 || icon.height() > 128)
Copy link
Copy Markdown
Contributor

@TheZ3ro TheZ3ro Sep 28, 2017

Choose a reason for hiding this comment

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

Insert brackets

* Fixes #904, icons are saved at or below 128x128
* Fixes #403, crash occurs due to dialog on non-gui thread
* Fixes #232, icon hashes calculated and compared against
@droidmonkey droidmonkey merged commit cb0b948 into release/2.2.1 Sep 29, 2017
@droidmonkey droidmonkey deleted the hotfix/unique-icons branch September 29, 2017 13:01
droidmonkey added a commit that referenced this pull request Oct 1, 2017
- Corrected multiple snap issues [#934, #1011]
- Corrected multiple custom icon issues [#708, #719, #994]
- Corrected multiple Yubikey issues [#880]
- Fixed single instance preventing load on occasion [#997]
- Keep entry history when merging databases [#970]
- Prevent data loss if passwords were mismatched [#1007]
- Fixed crash after merge [#941]
- Added configurable auto-type default delay [#703]
- Unlock database dialog window comes to front [#663]
- Translation and compiling fixes
@phoerious phoerious added pr: bugfix Pull request fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: bugfix Pull request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants