-
Notifications
You must be signed in to change notification settings - Fork 806
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
Improve 'Handle local file editing' feature. Add loading popup. Add force sync before opening a file. #4990
Improve 'Handle local file editing' feature. Add loading popup. Add force sync before opening a file. #4990
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4990 +/- ##
==========================================
+ Coverage 57.18% 57.31% +0.12%
==========================================
Files 138 138
Lines 17394 17394
==========================================
+ Hits 9947 9969 +22
+ Misses 7447 7425 -22
|
src/gui/folderman.cpp
Outdated
folderForFile->setProperty(editFileLocallyName, localFilePath); | ||
folderForFile->startSync(); | ||
QObject::connect(folderForFile, &Folder::syncFinished, this, &FolderMan::slotSyncFinishedBeforeOpeningForLocalEditing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is too brittle
please use a lambda with capture for the file name
clean up in case of errors will be easier and you will also have a much easier way to track the filename once sync is completed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mgallien Why is it brittle? If the slot is invoked by a proper Folder
instance, then, it will have a proper localFilePath
set. The reason for making it a slot instead of lambda is that I could disconnect a signal, otherwise, you will end up having the file opened each time the sync is finished after any file was opened via this signal, as the connection to lambda doesn't go anywhere.
Anyways, I have implemented an alternative solution with a QMap
of connections, even though, I'd prefer to just have a slot and make it all simpler.
2f978aa
to
816eba4
Compare
…orce sync before opening a file.' Signed-off-by: alex-z <blackslayer4@gmail.com>
6ab1faf
to
7672cb7
Compare
AppImage file: nextcloud-PR-4990-7672cb79036a2e1c22e1d6a07546ac92d34638b3-x86_64.AppImage |
SonarCloud Quality Gate failed. |
/backport to stable-3.6 |
Signed-off-by: alex-z blackslayer4@gmail.com
This will close #4981