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

Bugfix. Take root folder's files size into account when displaying the total size in selective sync dialog. #4532

Merged
merged 1 commit into from
May 16, 2022

Conversation

allexzander
Copy link
Contributor

@allexzander allexzander commented May 15, 2022

Signed-off-by: alex-z blackslayer4@gmail.com

@allexzander allexzander changed the title Bugfix. Take root folder's files size into account when displaying th… Bugfix. Take root folder's files size into account when displaying the total size in selective sync dialog. May 15, 2022
@allexzander
Copy link
Contributor Author

@mgallien FYI: The model of the SelectiveSyncWidget only contains a tree of folders (subfolders) with folder name and size, but, no information for files. I've tried to make the PR small and not affect the model. Let me know if you have a better idea.

Copy link
Collaborator

@mgallien mgallien left a comment

Choose a reason for hiding this comment

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

I am confused
in the screenshot I have seen the leaf folder have their size based only on their content
this PR is not really changing this ?
from user point of view the tree to select folder is a bit hard to use as you have not really a way to see how much space will be used by the selected folders
when you close this tree selector dialog, the computed size is great and that is working well

@@ -288,6 +290,19 @@ void SelectiveSyncWidget::slotUpdateDirectories(QStringList list)
root->setExpanded(true);
}

void SelectiveSyncWidget::slotUpdateRootFolderFilesSize(const QStringList &subfolders)
{
const auto job = qobject_cast<LsColJob *>(sender());
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add a check that job is not null

@allexzander allexzander requested a review from mgallien May 16, 2022 11:59
@allexzander allexzander force-pushed the bugfix/selective-sync-total-size-displayed branch from eff821a to 0a43c18 Compare May 16, 2022 12:07
@allexzander
Copy link
Contributor Author

/backport to stable-3.5

@allexzander
Copy link
Contributor Author

/rebase

…e total size in selective sync dialog.

Signed-off-by: alex-z <blackslayer4@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented May 16, 2022

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@mgallien mgallien added this to the 3.6.0 milestone May 16, 2022
@nextcloud-desktop-bot
Copy link

AppImage file: Nextcloud-PR-4532-101a92faf395cd2b22cb45ac4d543c6779a995e2-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.

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.

4 participants