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-emplace,
|
||||||
modernize-use-equals-delete,
|
modernize-use-equals-delete,
|
||||||
modernize-use-nodiscard,
|
modernize-use-nodiscard,
|
||||||
|
modernize-use-equals-default,
|
||||||
modernize-use-noexcept,
|
modernize-use-noexcept,
|
||||||
modernize-user-override,
|
modernize-user-override,
|
||||||
modernize-use-nullptr,
|
modernize-use-nullptr,
|
||||||
|
|
|
@ -43,9 +43,7 @@ namespace OCC {
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(lcSql, "nextcloud.sync.database.sql", QtInfoMsg)
|
Q_LOGGING_CATEGORY(lcSql, "nextcloud.sync.database.sql", QtInfoMsg)
|
||||||
|
|
||||||
SqlDatabase::SqlDatabase()
|
SqlDatabase::SqlDatabase() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
SqlDatabase::~SqlDatabase()
|
SqlDatabase::~SqlDatabase()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,9 +21,7 @@
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
SyncJournalFileRecord::SyncJournalFileRecord()
|
SyncJournalFileRecord::SyncJournalFileRecord() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray SyncJournalFileRecord::numericFileId() const
|
QByteArray SyncJournalFileRecord::numericFileId() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ class AccountManager : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static AccountManager *instance();
|
static AccountManager *instance();
|
||||||
~AccountManager() {}
|
~AccountManager() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the accounts to a given settings file
|
* Saves the accounts to a given settings file
|
||||||
|
@ -89,7 +89,7 @@ private:
|
||||||
// Adds an account to the tracked list, emitting accountAdded()
|
// Adds an account to the tracked list, emitting accountAdded()
|
||||||
void addAccountState(AccountState *accountState);
|
void addAccountState(AccountState *accountState);
|
||||||
|
|
||||||
AccountManager() {}
|
AccountManager() = default;
|
||||||
QList<AccountStatePtr> _accounts;
|
QList<AccountStatePtr> _accounts;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -85,10 +85,7 @@ static void addSettingsToJob(Account *account, QKeychain::Job *job)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WebFlowCredentials::WebFlowCredentials()
|
WebFlowCredentials::WebFlowCredentials() = default;
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
WebFlowCredentials::WebFlowCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key, const QList<QSslCertificate> &caCertificates)
|
WebFlowCredentials::WebFlowCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key, const QList<QSslCertificate> &caCertificates)
|
||||||
: _user(user)
|
: _user(user)
|
||||||
|
|
|
@ -33,7 +33,7 @@ class FolderWatcherPrivate : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FolderWatcherPrivate() {}
|
FolderWatcherPrivate() = default;
|
||||||
FolderWatcherPrivate(FolderWatcher *p, const QString &path);
|
FolderWatcherPrivate(FolderWatcher *p, const QString &path);
|
||||||
~FolderWatcherPrivate();
|
~FolderWatcherPrivate();
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Systray
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static Systray *instance();
|
static Systray *instance();
|
||||||
virtual ~Systray() {};
|
virtual ~Systray() = default;
|
||||||
|
|
||||||
enum class TaskBarPosition { Bottom, Left, Top, Right };
|
enum class TaskBarPosition { Bottom, Left, Top, Right };
|
||||||
Q_ENUM(TaskBarPosition);
|
Q_ENUM(TaskBarPosition);
|
||||||
|
|
|
@ -91,7 +91,7 @@ class UserModel : public QAbstractListModel
|
||||||
Q_PROPERTY(User* currentUser READ currentUser NOTIFY newUserSelected)
|
Q_PROPERTY(User* currentUser READ currentUser NOTIFY newUserSelected)
|
||||||
public:
|
public:
|
||||||
static UserModel *instance();
|
static UserModel *instance();
|
||||||
virtual ~UserModel() {};
|
virtual ~UserModel() = default;
|
||||||
|
|
||||||
void addUser(AccountStatePtr &user, const bool &isCurrent = false);
|
void addUser(AccountStatePtr &user, const bool &isCurrent = false);
|
||||||
int currentUserIndex();
|
int currentUserIndex();
|
||||||
|
@ -163,7 +163,7 @@ class UserAppsModel : public QAbstractListModel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static UserAppsModel *instance();
|
static UserAppsModel *instance();
|
||||||
virtual ~UserAppsModel() {};
|
virtual ~UserAppsModel() = default;
|
||||||
|
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,10 @@ WebViewPage::WebViewPage(QWidget *parent)
|
||||||
//_useSystemProxy = QNetworkProxyFactory::usesSystemConfiguration();
|
//_useSystemProxy = QNetworkProxyFactory::usesSystemConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
WebViewPage::~WebViewPage() {
|
WebViewPage::~WebViewPage() = default;
|
||||||
|
//{
|
||||||
// QNetworkProxyFactory::setUseSystemConfiguration(_useSystemProxy);
|
// QNetworkProxyFactory::setUseSystemConfiguration(_useSystemProxy);
|
||||||
}
|
//}
|
||||||
|
|
||||||
void WebViewPage::initializePage() {
|
void WebViewPage::initializePage() {
|
||||||
//QNetworkProxy::setApplicationProxy(QNetworkProxy::applicationProxy());
|
//QNetworkProxy::setApplicationProxy(QNetworkProxy::applicationProxy());
|
||||||
|
|
|
@ -62,7 +62,7 @@ class SimpleNetworkJob;
|
||||||
class AbstractSslErrorHandler
|
class AbstractSslErrorHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~AbstractSslErrorHandler() {}
|
virtual ~AbstractSslErrorHandler() = default;
|
||||||
virtual bool handleErrors(QList<QSslError>, const QSslConfiguration &conf, QList<QSslCertificate> *, AccountPtr) = 0;
|
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)
|
Q_LOGGING_CATEGORY(lcCredentials, "nextcloud.sync.credentials", QtInfoMsg)
|
||||||
|
|
||||||
AbstractCredentials::AbstractCredentials()
|
AbstractCredentials::AbstractCredentials() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractCredentials::setAccount(Account *account)
|
void AbstractCredentials::setAccount(Account *account)
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,9 +103,7 @@ static void addSettingsToJob(Account *account, QKeychain::Job *job)
|
||||||
job->setSettings(settings.release());
|
job->setSettings(settings.release());
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpCredentials::HttpCredentials()
|
HttpCredentials::HttpCredentials() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// From wizard
|
// From wizard
|
||||||
HttpCredentials::HttpCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key)
|
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
|
// Don't delete jobs in _jobsToDo and _runningJobs: they have parents
|
||||||
// that will be responsible for cleanup. Deleting them here would risk
|
// that will be responsible for cleanup. Deleting them here would risk
|
||||||
// deleting something that has already been deleted by a shared parent.
|
// deleting something that has already been deleted by a shared parent.
|
||||||
}
|
virtual ~PropagatorCompositeJob() = default;
|
||||||
|
|
||||||
void appendJob(PropagatorJob *job);
|
void appendJob(PropagatorJob *job);
|
||||||
void appendTask(const SyncFileItemPtr &item)
|
void appendTask(const SyncFileItemPtr &item)
|
||||||
|
|
|
@ -15,9 +15,7 @@
|
||||||
#include "syncfilestatus.h"
|
#include "syncfilestatus.h"
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
SyncFileStatus::SyncFileStatus()
|
SyncFileStatus::SyncFileStatus() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
SyncFileStatus::SyncFileStatus(SyncFileStatusTag tag)
|
SyncFileStatus::SyncFileStatus(SyncFileStatusTag tag)
|
||||||
: _tag(tag)
|
: _tag(tag)
|
||||||
|
|
|
@ -17,9 +17,7 @@
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
SyncResult::SyncResult()
|
SyncResult::SyncResult() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
SyncResult::Status SyncResult::status() const
|
SyncResult::Status SyncResult::status() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
class FileModifier
|
class FileModifier
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~FileModifier() { }
|
virtual ~FileModifier() = default;
|
||||||
virtual void remove(const QString &relativePath) = 0;
|
virtual void remove(const QString &relativePath) = 0;
|
||||||
virtual void insert(const QString &relativePath, qint64 size = 64, char contentChar = 'W') = 0;
|
virtual void insert(const QString &relativePath, qint64 size = 64, char contentChar = 'W') = 0;
|
||||||
virtual void setContents(const QString &relativePath, char contentChar) = 0;
|
virtual void setContents(const QString &relativePath, char contentChar) = 0;
|
||||||
|
|
Loading…
Reference in a new issue