mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 21:35:47 +03:00
Merge pull request #2541 from nicolasfella/work/nullptrflags
Don't use nullptr for QFlags
This commit is contained in:
commit
e787054d1c
3 changed files with 5 additions and 5 deletions
|
@ -102,7 +102,7 @@ void FolderStatusModel::setAccountState(const AccountState *accountState)
|
||||||
Qt::ItemFlags FolderStatusModel::flags(const QModelIndex &index) const
|
Qt::ItemFlags FolderStatusModel::flags(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
if (!_accountState) {
|
if (!_accountState) {
|
||||||
return nullptr;
|
return {};
|
||||||
}
|
}
|
||||||
switch (classify(index)) {
|
switch (classify(index)) {
|
||||||
case AddButton: {
|
case AddButton: {
|
||||||
|
@ -120,7 +120,7 @@ Qt::ItemFlags FolderStatusModel::flags(const QModelIndex &index) const
|
||||||
case SubFolder:
|
case SubFolder:
|
||||||
return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable;
|
return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
|
QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
|
||||||
|
|
|
@ -683,7 +683,7 @@ void ownCloudGui::slotShowShareDialog(const QString &sharePath, const QString &l
|
||||||
| SharePermissionUpdate | SharePermissionCreate | SharePermissionDelete
|
| SharePermissionUpdate | SharePermissionCreate | SharePermissionDelete
|
||||||
| SharePermissionShare;
|
| SharePermissionShare;
|
||||||
if (!resharingAllowed) {
|
if (!resharingAllowed) {
|
||||||
maxSharingPermissions = nullptr;
|
maxSharingPermissions = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -89,10 +89,10 @@ class SelectiveSyncDialog : public QDialog
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
// Dialog for a specific folder (used from the account settings button)
|
// Dialog for a specific folder (used from the account settings button)
|
||||||
explicit SelectiveSyncDialog(AccountPtr account, Folder *folder, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
|
explicit SelectiveSyncDialog(AccountPtr account, Folder *folder, QWidget *parent = nullptr, Qt::WindowFlags f = {});
|
||||||
|
|
||||||
// Dialog for the whole account (Used from the wizard)
|
// Dialog for the whole account (Used from the wizard)
|
||||||
explicit SelectiveSyncDialog(AccountPtr account, const QString &folder, const QStringList &blacklist, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
|
explicit SelectiveSyncDialog(AccountPtr account, const QString &folder, const QStringList &blacklist, QWidget *parent = nullptr, Qt::WindowFlags f = {});
|
||||||
|
|
||||||
void accept() override;
|
void accept() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue