Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SVG rendering error in SvgImageProvider #5666

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

claucambra
Copy link
Collaborator

As part of IconUtils::createSvgImageWithCustomColor we try to see if there is a pre-existing image with the desired colour combination string at a given path. However, we do not check if the file exists and instead try directly to create the image; this creates an unnecessary error when we could just check for the existence of the file at the path.

2023-05-09 14:49:16:215 [ warning qt.svg unknown:0 ]: Cannot open file ':/client/theme/black/share.svg', because: No such file or directory

This PR adds this file check first, avoiding the error.

Additionally, this PR includes some clean up of the relevant code.

@claucambra claucambra self-assigned this May 9, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

88.5% 88.5% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #5666 (7edfe21) into master (759c2a2) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head 7edfe21 differs from pull request most recent head ed05436. Consider uploading reports for the commit ed05436 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5666      +/-   ##
==========================================
- Coverage   60.08%   60.06%   -0.03%     
==========================================
  Files         145      145              
  Lines       18756    18746      -10     
==========================================
- Hits        11270    11260      -10     
  Misses       7486     7486              

see 5 files with indirect coverage changes

@claucambra
Copy link
Collaborator Author

/backport to stable-3.9

Copy link
Contributor

@allexzander allexzander left a comment

Choose a reason for hiding this comment

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

@claucambra Please squash before merging

@claucambra claucambra force-pushed the bugfix/svg-provider-error-fix branch from 7edfe21 to bc514ca Compare July 20, 2023 15:52
@claucambra claucambra force-pushed the bugfix/svg-provider-error-fix branch from bc514ca to ed05436 Compare July 20, 2023 15:53
@claucambra claucambra merged commit a14f5bc into master Jul 20, 2023
@claucambra claucambra deleted the bugfix/svg-provider-error-fix branch July 20, 2023 16:02
@sonarcloud
Copy link

sonarcloud bot commented Jul 20, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

76.0% 76.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5666-ed05436ea572a4e17f0d43d6913a345c60b19935-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien mgallien added this to the 3.10.0 milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants