mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +03:00
Enable the modernize-use-equals-default check on clang-tidy
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
2d4d66b998
commit
2f8c29082a
16 changed files with 24 additions and 39 deletions
|
@ -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,
|
||||
|
|
|
@ -43,9 +43,7 @@ namespace OCC {
|
|||
|
||||
Q_LOGGING_CATEGORY(lcSql, "nextcloud.sync.database.sql", QtInfoMsg)
|
||||
|
||||
SqlDatabase::SqlDatabase()
|
||||
{
|
||||
}
|
||||
SqlDatabase::SqlDatabase() = default;
|
||||
|
||||
SqlDatabase::~SqlDatabase()
|
||||
{
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
|
||||
namespace OCC {
|
||||
|
||||
SyncJournalFileRecord::SyncJournalFileRecord()
|
||||
{
|
||||
}
|
||||
SyncJournalFileRecord::SyncJournalFileRecord() = default;
|
||||
|
||||
QByteArray SyncJournalFileRecord::numericFileId() const
|
||||
{
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -33,7 +33,7 @@ class FolderWatcherPrivate : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FolderWatcherPrivate() {}
|
||||
FolderWatcherPrivate() = default;
|
||||
FolderWatcherPrivate(FolderWatcher *p, const QString &path);
|
||||
~FolderWatcherPrivate();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,9 +23,7 @@ namespace OCC {
|
|||
|
||||
Q_LOGGING_CATEGORY(lcCredentials, "nextcloud.sync.credentials", QtInfoMsg)
|
||||
|
||||
AbstractCredentials::AbstractCredentials()
|
||||
{
|
||||
}
|
||||
AbstractCredentials::AbstractCredentials() = default;
|
||||
|
||||
void AbstractCredentials::setAccount(Account *account)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
#include "syncfilestatus.h"
|
||||
|
||||
namespace OCC {
|
||||
SyncFileStatus::SyncFileStatus()
|
||||
{
|
||||
}
|
||||
SyncFileStatus::SyncFileStatus() = default;
|
||||
|
||||
SyncFileStatus::SyncFileStatus(SyncFileStatusTag tag)
|
||||
: _tag(tag)
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
namespace OCC {
|
||||
|
||||
SyncResult::SyncResult()
|
||||
{
|
||||
}
|
||||
SyncResult::SyncResult() = default;
|
||||
|
||||
SyncResult::Status SyncResult::status() const
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue