Skip to content

Use QFileInfo::exists where we are only creating a QFileInfo to check if file exists#5291

Merged
claucambra merged 1 commit into
masterfrom
bugfix/qfileinfo-exists
Dec 20, 2022
Merged

Use QFileInfo::exists where we are only creating a QFileInfo to check if file exists#5291
claucambra merged 1 commit into
masterfrom
bugfix/qfileinfo-exists

Conversation

@claucambra

Copy link
Copy Markdown
Collaborator

QFileInfo::exists is faster

Signed-off-by: Claudio Cambra claudio.cambra@nextcloud.com

@codecov

codecov Bot commented Dec 19, 2022

Copy link
Copy Markdown

Codecov Report

Merging #5291 (3bbd1d6) into master (7f6b18b) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

❗ Current head 3bbd1d6 differs from pull request most recent head f6c4c32. Consider uploading reports for the commit f6c4c32 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5291      +/-   ##
==========================================
- Coverage   57.59%   57.52%   -0.08%     
==========================================
  Files         139      139              
  Lines       17596    17596              
==========================================
- Hits        10135    10122      -13     
- Misses       7461     7474      +13     
Impacted Files Coverage Δ
src/libsync/syncengine.cpp 81.32% <100.00%> (-0.44%) ⬇️
src/libsync/vfs/cfapi/hydrationjob.cpp 52.38% <0.00%> (-3.71%) ⬇️
src/libsync/vfs/cfapi/vfs_cfapi.cpp 83.07% <0.00%> (-2.37%) ⬇️
src/libsync/vfs/cfapi/cfapiwrapper.cpp 72.50% <0.00%> (-1.82%) ⬇️
src/libsync/discovery.cpp 86.22% <0.00%> (+0.28%) ⬆️
src/libsync/propagatedownload.cpp 64.90% <0.00%> (+1.17%) ⬆️

… if file exists, as it is faster

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
@mgallien mgallien force-pushed the bugfix/qfileinfo-exists branch from 3bbd1d6 to f6c4c32 Compare December 20, 2022 08:44
@nextcloud-desktop-bot

Copy link
Copy Markdown

AppImage file: nextcloud-PR-5291-f6c4c32b6e25948c8782ca08f27d6285ca1ee796-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.

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

20.0% 20.0% Coverage
0.0% 0.0% Duplication

@claucambra claucambra merged commit cdc58c3 into master Dec 20, 2022
@claucambra claucambra deleted the bugfix/qfileinfo-exists branch December 20, 2022 11:07
@mgallien mgallien added this to the 3.7.0 milestone Jan 30, 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.

3 participants