-
Notifications
You must be signed in to change notification settings - Fork 671
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
Ensure syncStateChanged is emitted #10642
Conversation
Kudos, SonarCloud Quality Gate passed! |
Results for GUI-tests-oc10 https://drone.owncloud.com/owncloud/client/14769/6/1 💥 The GUI tests failed. GUI Logs: https://cache.owncloud.com/public/owncloud/client/14769/oc10/guiReportUpload/index.html |
@@ -454,19 +453,21 @@ void Folder::setSyncPaused(bool paused) | |||
_definition.paused = paused; | |||
saveToSettings(); | |||
|
|||
emit syncPausedChanged(this, paused); |
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.
Why would one send this
as payload? Isn't that what sender()
is there for?
Otherwise, I wonder why this is needed at all. setSyncState(SyncResult::Paused)
should do, right? Seems redundant to me.
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.
I just moved the code, feel free to open another refactoring issue.
if (!paused) { | ||
setSyncState(SyncResult::NotYetStarted); | ||
} else { | ||
setSyncState(SyncResult::Paused); | ||
} | ||
emit syncPausedChanged(this, paused); | ||
emit syncStateChange(); | ||
emit canSyncChanged(); | ||
} | ||
|
||
void Folder::setSyncState(SyncResult::Status state) |
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.
I guess this could be renamed to changeSyncState
to suggest that this emits a signal, too.
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.
Thats not how Qt api is named
No description provided.