Don't use nullptr for QFlags
authorNicolas Fella <nicolas.fella@gmx.de>
Fri, 9 Oct 2020 20:56:45 +0000 (22:56 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Mon, 12 Oct 2020 11:52:53 +0000 (11:52 +0000)
This fixes some deprecation warnings

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
src/gui/folderstatusmodel.cpp
src/gui/owncloudgui.cpp
src/gui/selectivesyncdialog.h

index 92e6b93e7bc86311eef5949a327b49a3157f15d0..48197f0b7359a431e4f16d05a9a2eff194a4e2e8 100644 (file)
@@ -102,7 +102,7 @@ void FolderStatusModel::setAccountState(const AccountState *accountState)
 Qt::ItemFlags FolderStatusModel::flags(const QModelIndex &index) const
 {
     if (!_accountState) {
-        return nullptr;
+        return {};
     }
     switch (classify(index)) {
     case AddButton: {
@@ -120,7 +120,7 @@ Qt::ItemFlags FolderStatusModel::flags(const QModelIndex &index) const
     case SubFolder:
         return Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable;
     }
-    return nullptr;
+    return {};
 }
 
 QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
index 16eed86f6a0a126aea0e4295980102dfc179911f..f328cb79d0dcc67893ccc8110e3508d22141f252 100644 (file)
@@ -683,7 +683,7 @@ void ownCloudGui::slotShowShareDialog(const QString &sharePath, const QString &l
         | SharePermissionUpdate | SharePermissionCreate | SharePermissionDelete
         | SharePermissionShare;
     if (!resharingAllowed) {
-        maxSharingPermissions = nullptr;
+        maxSharingPermissions = {};
     }
 
 
index 3426ec550996ee4b45e6cf3bcf61525bfed726bb..7480f8986f5120e07ea604dbf44c67f269ad632e 100644 (file)
@@ -89,10 +89,10 @@ class SelectiveSyncDialog : public QDialog
     Q_OBJECT
 public:
     // 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)
-    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;