-
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
Allow selective sync of spaces in folder wizard #11044
Conversation
src/gui/selectivesyncwidget.cpp
Outdated
@@ -263,8 +264,8 @@ void SelectiveSyncWidget::slotItemExpanded(QTreeWidgetItem *item) | |||
QString dir = item->data(0, Qt::UserRole).toString(); | |||
if (dir.isEmpty()) | |||
return; | |||
// TODO: legacy | |||
PropfindJob *job = new PropfindJob(_account, _account->davUrl(), _folderPath + dir, PropfindJob::Depth::One, this); | |||
Q_ASSERT(!_davUrl.isEmpty()); |
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.
How about a getter with that check?
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.
Would save a tiny bit of code duplication, but we cannot enforce the use of that getter over the variable anyway...
Plus, I'm not sure at this point whether we might have to provide such a getter for outside use in the future. We already have a public setter. Then, you probably can't just assert the value is not empty, I guess.
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.
There are private getters :D
And in general I'd say we should always use getters instead of raw vars.
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.
Well, if you prefer it...
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.
Qt codestyle does not use get as getter prefix
Closes #10596.