Enable the modernize-use-equals-default check on clang-tidy

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-08-12 17:19:49 +02:00 committed by Kevin Ottens
parent 2d4d66b998
commit 2f8c29082a
16 changed files with 24 additions and 39 deletions

View file

@ -16,6 +16,7 @@ Checks: '-*,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-nodiscard,
modernize-use-equals-default,
modernize-use-noexcept,
modernize-user-override,
modernize-use-nullptr,

View file

@ -43,9 +43,7 @@ namespace OCC {
Q_LOGGING_CATEGORY(lcSql, "nextcloud.sync.database.sql", QtInfoMsg)
SqlDatabase::SqlDatabase()
{
}
SqlDatabase::SqlDatabase() = default;
SqlDatabase::~SqlDatabase()
{

View file

@ -21,9 +21,7 @@
namespace OCC {
SyncJournalFileRecord::SyncJournalFileRecord()
{
}
SyncJournalFileRecord::SyncJournalFileRecord() = default;
QByteArray SyncJournalFileRecord::numericFileId() const
{

View file

@ -28,7 +28,7 @@ class AccountManager : public QObject
Q_OBJECT
public:
static AccountManager *instance();
~AccountManager() {}
~AccountManager() = default;
/**
* Saves the accounts to a given settings file
@ -89,7 +89,7 @@ private:
// Adds an account to the tracked list, emitting accountAdded()
void addAccountState(AccountState *accountState);
AccountManager() {}
AccountManager() = default;
QList<AccountStatePtr> _accounts;
public slots:

View file

@ -85,10 +85,7 @@ static void addSettingsToJob(Account *account, QKeychain::Job *job)
}
#endif
WebFlowCredentials::WebFlowCredentials()
{
}
WebFlowCredentials::WebFlowCredentials() = default;
WebFlowCredentials::WebFlowCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key, const QList<QSslCertificate> &caCertificates)
: _user(user)

View file

@ -33,7 +33,7 @@ class FolderWatcherPrivate : public QObject
{
Q_OBJECT
public:
FolderWatcherPrivate() {}
FolderWatcherPrivate() = default;
FolderWatcherPrivate(FolderWatcher *p, const QString &path);
~FolderWatcherPrivate();

View file

@ -45,7 +45,7 @@ class Systray
Q_OBJECT
public:
static Systray *instance();
virtual ~Systray() {};
virtual ~Systray() = default;
enum class TaskBarPosition { Bottom, Left, Top, Right };
Q_ENUM(TaskBarPosition);

View file

@ -91,7 +91,7 @@ class UserModel : public QAbstractListModel
Q_PROPERTY(User* currentUser READ currentUser NOTIFY newUserSelected)
public:
static UserModel *instance();
virtual ~UserModel() {};
virtual ~UserModel() = default;
void addUser(AccountStatePtr &user, const bool &isCurrent = false);
int currentUserIndex();
@ -163,7 +163,7 @@ class UserAppsModel : public QAbstractListModel
Q_OBJECT
public:
static UserAppsModel *instance();
virtual ~UserAppsModel() {};
virtual ~UserAppsModel() = default;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;

View file

@ -32,9 +32,10 @@ WebViewPage::WebViewPage(QWidget *parent)
//_useSystemProxy = QNetworkProxyFactory::usesSystemConfiguration();
}
WebViewPage::~WebViewPage() {
//QNetworkProxyFactory::setUseSystemConfiguration(_useSystemProxy);
}
WebViewPage::~WebViewPage() = default;
//{
// QNetworkProxyFactory::setUseSystemConfiguration(_useSystemProxy);
//}
void WebViewPage::initializePage() {
//QNetworkProxy::setApplicationProxy(QNetworkProxy::applicationProxy());

View file

@ -62,7 +62,7 @@ class SimpleNetworkJob;
class AbstractSslErrorHandler
{
public:
virtual ~AbstractSslErrorHandler() {}
virtual ~AbstractSslErrorHandler() = default;
virtual bool handleErrors(QList<QSslError>, const QSslConfiguration &conf, QList<QSslCertificate> *, AccountPtr) = 0;
};

View file

@ -23,9 +23,7 @@ namespace OCC {
Q_LOGGING_CATEGORY(lcCredentials, "nextcloud.sync.credentials", QtInfoMsg)
AbstractCredentials::AbstractCredentials()
{
}
AbstractCredentials::AbstractCredentials() = default;
void AbstractCredentials::setAccount(Account *account)
{

View file

@ -103,9 +103,7 @@ static void addSettingsToJob(Account *account, QKeychain::Job *job)
job->setSettings(settings.release());
}
HttpCredentials::HttpCredentials()
{
}
HttpCredentials::HttpCredentials() = default;
// From wizard
HttpCredentials::HttpCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key)

View file

@ -225,12 +225,10 @@ public:
{
}
virtual ~PropagatorCompositeJob()
{
// Don't delete jobs in _jobsToDo and _runningJobs: they have parents
// that will be responsible for cleanup. Deleting them here would risk
// deleting something that has already been deleted by a shared parent.
}
// Don't delete jobs in _jobsToDo and _runningJobs: they have parents
// that will be responsible for cleanup. Deleting them here would risk
// deleting something that has already been deleted by a shared parent.
virtual ~PropagatorCompositeJob() = default;
void appendJob(PropagatorJob *job);
void appendTask(const SyncFileItemPtr &item)

View file

@ -15,9 +15,7 @@
#include "syncfilestatus.h"
namespace OCC {
SyncFileStatus::SyncFileStatus()
{
}
SyncFileStatus::SyncFileStatus() = default;
SyncFileStatus::SyncFileStatus(SyncFileStatusTag tag)
: _tag(tag)

View file

@ -17,9 +17,7 @@
namespace OCC {
SyncResult::SyncResult()
{
}
SyncResult::SyncResult() = default;
SyncResult::Status SyncResult::status() const
{

View file

@ -66,7 +66,7 @@ public:
class FileModifier
{
public:
virtual ~FileModifier() { }
virtual ~FileModifier() = default;
virtual void remove(const QString &relativePath) = 0;
virtual void insert(const QString &relativePath, qint64 size = 64, char contentChar = 'W') = 0;
virtual void setContents(const QString &relativePath, char contentChar) = 0;