diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/3rdparty/QProgressIndicator/QProgressIndicator.h | 2 | ||||
-rw-r--r-- | src/3rdparty/qtsingleapplication/qtlocalpeer.h | 2 | ||||
-rw-r--r-- | src/common/checksums.h | 4 | ||||
-rw-r--r-- | src/common/filesystembase.h | 2 | ||||
-rw-r--r-- | src/common/syncjournaldb.h | 2 | ||||
-rw-r--r-- | src/common/utility.h | 2 | ||||
-rw-r--r-- | src/gui/accountstate.h | 2 | ||||
-rw-r--r-- | src/gui/headerbanner.h | 2 | ||||
-rw-r--r-- | src/gui/tray/ActivityListModel.h | 2 | ||||
-rw-r--r-- | src/gui/tray/UserModel.h | 6 | ||||
-rw-r--r-- | src/libsync/capabilities.h | 2 | ||||
-rw-r--r-- | test/syncenginetestutils.h | 4 |
13 files changed, 17 insertions, 16 deletions
diff --git a/.clang-tidy b/.clang-tidy index 34de4128f..17e948c2a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -18,6 +18,7 @@ Checks: '-*, modernize-use-nodiscard, modernize-use-noexcept, modernize-user-override, + modernize-use-nullptr, modernize-use-transparent-functors, modernize-use-uncaught-exceptions, modernize-use-using, diff --git a/src/3rdparty/QProgressIndicator/QProgressIndicator.h b/src/3rdparty/QProgressIndicator/QProgressIndicator.h index 727866009..4871cb8a2 100644 --- a/src/3rdparty/QProgressIndicator/QProgressIndicator.h +++ b/src/3rdparty/QProgressIndicator/QProgressIndicator.h @@ -42,7 +42,7 @@ class QProgressIndicator : public QWidget Q_PROPERTY(bool displayedWhenStopped READ isDisplayedWhenStopped WRITE setDisplayedWhenStopped) Q_PROPERTY(QColor color READ color WRITE setColor) public: - QProgressIndicator(QWidget* parent = 0); + QProgressIndicator(QWidget* parent = nullptr); /*! Returns the delay between animation steps. \return The number of milliseconds between animation steps. By default, the animation delay is set to 40 milliseconds. diff --git a/src/3rdparty/qtsingleapplication/qtlocalpeer.h b/src/3rdparty/qtsingleapplication/qtlocalpeer.h index 361936319..ce93a5e0a 100644 --- a/src/3rdparty/qtsingleapplication/qtlocalpeer.h +++ b/src/3rdparty/qtsingleapplication/qtlocalpeer.h @@ -40,7 +40,7 @@ class QtLocalPeer : public QObject Q_OBJECT public: - explicit QtLocalPeer(QObject *parent = 0, const QString &appId = QString()); + explicit QtLocalPeer(QObject *parent = nullptr, const QString &appId = QString()); bool isClient(); bool sendMessage(const QString &message, int timeout, bool block); QString applicationId() const diff --git a/src/common/checksums.h b/src/common/checksums.h index 02cfbe8eb..29a5bcf12 100644 --- a/src/common/checksums.h +++ b/src/common/checksums.h @@ -70,7 +70,7 @@ class OCSYNC_EXPORT ComputeChecksum : public QObject { Q_OBJECT public: - explicit ComputeChecksum(QObject *parent = 0); + explicit ComputeChecksum(QObject *parent = nullptr); /** * Sets the checksum type to be used. The default is empty. @@ -112,7 +112,7 @@ class OCSYNC_EXPORT ValidateChecksumHeader : public QObject { Q_OBJECT public: - explicit ValidateChecksumHeader(QObject *parent = 0); + explicit ValidateChecksumHeader(QObject *parent = nullptr); /** * Check a file's actual checksum against the provided checksumHeader diff --git a/src/common/filesystembase.h b/src/common/filesystembase.h index 08abdfcb1..c4a19056e 100644 --- a/src/common/filesystembase.h +++ b/src/common/filesystembase.h @@ -107,7 +107,7 @@ namespace FileSystem { * Equivalent to QFile::remove(), except on Windows, where it will also * successfully remove read-only files. */ - bool OCSYNC_EXPORT remove(const QString &fileName, QString *errorString = 0); + bool OCSYNC_EXPORT remove(const QString &fileName, QString *errorString = nullptr); /** * Move the specified file or folder to the trash. (Only implemented on linux) diff --git a/src/common/syncjournaldb.h b/src/common/syncjournaldb.h index e8ecbaa2e..c6520cbd1 100644 --- a/src/common/syncjournaldb.h +++ b/src/common/syncjournaldb.h @@ -42,7 +42,7 @@ class OCSYNC_EXPORT SyncJournalDb : public QObject { Q_OBJECT public: - explicit SyncJournalDb(const QString &dbFilePath, QObject *parent = 0); + explicit SyncJournalDb(const QString &dbFilePath, QObject *parent = nullptr); virtual ~SyncJournalDb(); /// Create a journal path for a specific configuration diff --git a/src/common/utility.h b/src/common/utility.h index 1aa17928c..6e9738631 100644 --- a/src/common/utility.h +++ b/src/common/utility.h @@ -188,7 +188,7 @@ namespace Utility { /** Returns a new settings pre-set in a specific group. The Settings will be created with the given parent. If no parent is specified, the caller must destroy the settings */ - OCSYNC_EXPORT std::unique_ptr<QSettings> settingsWithGroup(const QString &group, QObject *parent = 0); + OCSYNC_EXPORT std::unique_ptr<QSettings> settingsWithGroup(const QString &group, QObject *parent = nullptr); /** Sanitizes a string that shall become part of a filename. * diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h index 7e390e167..78aee40af 100644 --- a/src/gui/accountstate.h +++ b/src/gui/accountstate.h @@ -229,7 +229,7 @@ class AccountApp : public QObject public: AccountApp(const QString &name, const QUrl &url, const QString &id, const QUrl &iconUrl, - QObject* parent = 0); + QObject* parent = nullptr); QString name() const; QUrl url() const; diff --git a/src/gui/headerbanner.h b/src/gui/headerbanner.h index c52d73c1f..f91590f24 100644 --- a/src/gui/headerbanner.h +++ b/src/gui/headerbanner.h @@ -73,7 +73,7 @@ class HeaderBanner : public QWidget { Q_OBJECT public: - HeaderBanner(QWidget *parent = 0); + HeaderBanner(QWidget *parent = nullptr); void setup(const QString &title, const QPixmap &logo, const QPixmap &banner, const Qt::TextFormat titleFormat, const QString &styleSheet); diff --git a/src/gui/tray/ActivityListModel.h b/src/gui/tray/ActivityListModel.h index 8f6fba4e2..fd7da9aa4 100644 --- a/src/gui/tray/ActivityListModel.h +++ b/src/gui/tray/ActivityListModel.h @@ -56,7 +56,7 @@ public: AccountConnectedRole, SyncFileStatusRole}; - explicit ActivityListModel(AccountState *accountState, QObject* parent = 0); + explicit ActivityListModel(AccountState *accountState, QObject* parent = nullptr); QVariant data(const QModelIndex &index, int role) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; diff --git a/src/gui/tray/UserModel.h b/src/gui/tray/UserModel.h index 10836dfd6..8fcd65f80 100644 --- a/src/gui/tray/UserModel.h +++ b/src/gui/tray/UserModel.h @@ -22,7 +22,7 @@ class User : public QObject Q_PROPERTY(bool hasLocalFolder READ hasLocalFolder NOTIFY hasLocalFolderChanged) Q_PROPERTY(bool serverHasTalk READ serverHasTalk NOTIFY serverHasTalkChanged) public: - User(AccountStatePtr &account, const bool &isCurrent = false, QObject* parent = 0); + User(AccountStatePtr &account, const bool &isCurrent = false, QObject* parent = nullptr); AccountPtr account() const; @@ -143,7 +143,7 @@ protected: private: static UserModel *_instance; - UserModel(QObject *parent = 0); + UserModel(QObject *parent = nullptr); QList<User*> _users; int _currentUserId = 0; bool _init = true; @@ -185,7 +185,7 @@ protected: private: static UserAppsModel *_instance; - UserAppsModel(QObject *parent = 0); + UserAppsModel(QObject *parent = nullptr); AccountAppList _apps; }; diff --git a/src/libsync/capabilities.h b/src/libsync/capabilities.h index 1fdd169c6..a92db1e7c 100644 --- a/src/libsync/capabilities.h +++ b/src/libsync/capabilities.h @@ -147,7 +147,7 @@ class OWNCLOUDSYNC_EXPORT DirectEditor : public QObject { Q_OBJECT public: - DirectEditor(const QString &id, const QString &name, QObject* parent = 0); + DirectEditor(const QString &id, const QString &name, QObject* parent = nullptr); void addMimetype(const QByteArray &mimeType); void addOptionalMimetype(const QByteArray &mimeType); diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 17889a1a7..fedf091ac 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -238,7 +238,7 @@ public: etag = file->etag; return file; } - return 0; + return nullptr; } FileInfo *createDir(const QString &relativePath) { @@ -816,7 +816,7 @@ public: protected: QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, - QIODevice *outgoingData = 0) { + QIODevice *outgoingData = nullptr) { if (_override) { if (auto reply = _override(op, request, outgoingData)) return reply; |