Merge pull request #2021 from nextcloud/use_default_for_trivial_ctor_and_dtor

Use = default for trivial ctors and dtors
This commit is contained in:
Michael Schuster 2020-05-27 05:17:24 +02:00 committed by GitHub
commit 044a4bf6b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 26 additions and 78 deletions

View file

@ -255,9 +255,7 @@ void ValidateChecksumHeader::slotChecksumCalculated(const QByteArray &checksumTy
emit validated(checksumType, checksum);
}
CSyncChecksumHook::CSyncChecksumHook()
{
}
CSyncChecksumHook::CSyncChecksumHook() = default;
QByteArray CSyncChecksumHook::hook(const QByteArray &path, const QByteArray &otherChecksumHeader, void * /*this_obj*/)
{

View file

@ -261,9 +261,7 @@ ExcludedFiles::ExcludedFiles(QString localPath)
addInTreeExcludeFilePath(fi.absoluteFilePath());
}
ExcludedFiles::~ExcludedFiles()
{
}
ExcludedFiles::~ExcludedFiles() = default;
void ExcludedFiles::addExcludeFilePath(const QString &path)
{

View file

@ -57,9 +57,7 @@ AccountState::AccountState(AccountPtr account)
_timeSinceLastETagCheck.invalidate();
}
AccountState::~AccountState()
{
}
AccountState::~AccountState() = default;
AccountState *AccountState::loadFromSettings(AccountPtr account, QSettings & /*settings*/)
{

View file

@ -41,9 +41,7 @@ Flow2Auth::Flow2Auth(Account *account, QObject *parent)
QObject::connect(&_pollTimer, &QTimer::timeout, this, &Flow2Auth::slotPollTimerTimeout);
}
Flow2Auth::~Flow2Auth()
{
}
Flow2Auth::~Flow2Auth() = default;
void Flow2Auth::start()
{

View file

@ -27,9 +27,7 @@ namespace OCC {
Q_LOGGING_CATEGORY(lcOauth, "nextcloud.sync.credentials.oauth", QtInfoMsg)
OAuth::~OAuth()
{
}
OAuth::~OAuth() = default;
static void httpReplyAndClose(QTcpSocket *socket, const char *code, const char *html,
const char *moreHeaders = nullptr)

View file

@ -49,9 +49,7 @@ FolderStatusModel::FolderStatusModel(QObject *parent)
}
FolderStatusModel::~FolderStatusModel()
{
}
FolderStatusModel::~FolderStatusModel() = default;
static bool sortByFolderHeader(const FolderStatusModel::SubFolderInfo &lhs, const FolderStatusModel::SubFolderInfo &rhs)
{

View file

@ -44,9 +44,7 @@ FolderWatcher::FolderWatcher(Folder *folder)
{
}
FolderWatcher::~FolderWatcher()
{
}
FolderWatcher::~FolderWatcher() = default;
void FolderWatcher::init(const QString &root)
{

View file

@ -42,9 +42,7 @@ FolderWatcherPrivate::FolderWatcherPrivate(FolderWatcher *p, const QString &path
QMetaObject::invokeMethod(this, "slotAddFolderRecursive", Q_ARG(QString, path));
}
FolderWatcherPrivate::~FolderWatcherPrivate()
{
}
FolderWatcherPrivate::~FolderWatcherPrivate() = default;
// attention: result list passed by reference!
bool FolderWatcherPrivate::findFoldersBelow(const QDir &dir, QStringList &fullList)

View file

@ -77,9 +77,7 @@ FolderWizardLocalPath::FolderWizardLocalPath(const AccountPtr &account)
_ui.warnLabel->hide();
}
FolderWizardLocalPath::~FolderWizardLocalPath()
{
}
FolderWizardLocalPath::~FolderWizardLocalPath() = default;
void FolderWizardLocalPath::initializePage()
{
@ -416,9 +414,7 @@ LsColJob *FolderWizardRemotePath::runLsColJob(const QString &path)
return job;
}
FolderWizardRemotePath::~FolderWizardRemotePath()
{
}
FolderWizardRemotePath::~FolderWizardRemotePath() = default;
bool FolderWizardRemotePath::isComplete() const
{
@ -485,9 +481,7 @@ FolderWizardSelectiveSync::FolderWizardSelectiveSync(const AccountPtr &account)
layout->addWidget(_selectiveSync);
}
FolderWizardSelectiveSync::~FolderWizardSelectiveSync()
{
}
FolderWizardSelectiveSync::~FolderWizardSelectiveSync() = default;
void FolderWizardSelectiveSync::initializePage()
@ -552,9 +546,7 @@ FolderWizard::FolderWizard(AccountPtr account, QWidget *parent)
setButtonText(QWizard::FinishButton, tr("Add Sync Connection"));
}
FolderWizard::~FolderWizard()
{
}
FolderWizard::~FolderWizard() = default;
bool FolderWizard::eventFilter(QObject *watched, QEvent *event)
{

View file

@ -143,9 +143,7 @@ LogBrowser::LogBrowser(QWidget *parent)
_logWidget->document()->setMaximumBlockCount(lines);
}
LogBrowser::~LogBrowser()
{
}
LogBrowser::~LogBrowser() = default;
void LogBrowser::showEvent(QShowEvent *)
{

View file

@ -41,7 +41,5 @@ SyncLogDialog::SyncLogDialog(QWidget *parent)
}
}
SyncLogDialog::~SyncLogDialog()
{
}
SyncLogDialog::~SyncLogDialog() = default;
}

View file

@ -21,9 +21,7 @@
namespace OCC {
SyncRunFileLog::SyncRunFileLog()
{
}
SyncRunFileLog::SyncRunFileLog() = default;
QString SyncRunFileLog::dateTimeStr(const QDateTime &dt)
{

View file

@ -416,9 +416,7 @@ void OwncloudSetupPage::slotCertificateAccepted()
}
}
OwncloudSetupPage::~OwncloudSetupPage()
{
}
OwncloudSetupPage::~OwncloudSetupPage() = default;
void OwncloudSetupPage::slotStyleChanged()
{

View file

@ -54,9 +54,7 @@ OwncloudWizardResultPage::OwncloudWizardResultPage()
setupCustomization();
}
OwncloudWizardResultPage::~OwncloudWizardResultPage()
{
}
OwncloudWizardResultPage::~OwncloudWizardResultPage() = default;
void OwncloudWizardResultPage::setComplete(bool complete)
{

View file

@ -75,9 +75,7 @@ ClientSideEncryption* Account::e2e()
return &_e2e;
}
Account::~Account()
{
}
Account::~Account() = default;
QString Account::davPath() const
{

View file

@ -87,9 +87,7 @@ BandwidthManager::BandwidthManager(OwncloudPropagator *p)
_relativeDownloadDelayTimer.setSingleShot(true); // will be restarted from the measuring timer
}
BandwidthManager::~BandwidthManager()
{
}
BandwidthManager::~BandwidthManager() = default;
void BandwidthManager::registerUploadDevice(UploadDevice *p)
{

View file

@ -610,9 +610,7 @@ QByteArray encryptStringAsymmetric(EVP_PKEY *publicKey, const QByteArray& data)
}
}
ClientSideEncryption::ClientSideEncryption()
{
}
ClientSideEncryption::ClientSideEncryption() = default;
void ClientSideEncryption::setAccount(AccountPtr account)
{

View file

@ -71,9 +71,7 @@ CookieJar::CookieJar(QObject *parent)
{
}
CookieJar::~CookieJar()
{
}
CookieJar::~CookieJar() = default;
bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url)
{

View file

@ -182,9 +182,7 @@ static QString readContentsAsString(QXmlStreamReader &reader)
}
LsColXMLParser::LsColXMLParser()
{
}
LsColXMLParser::LsColXMLParser() = default;
bool LsColXMLParser::parse(const QByteArray &xml, QHash<QString, ExtraFolderInfo> *fileInfo, const QString &expectedPath)
{

View file

@ -73,9 +73,7 @@ qint64 freeSpaceLimit()
return value;
}
OwncloudPropagator::~OwncloudPropagator()
{
}
OwncloudPropagator::~OwncloudPropagator() = default;
int OwncloudPropagator::maximumActiveTransferJob()
@ -1001,9 +999,7 @@ void PropagateDirectory::slotSubJobsFinished(SyncFileItem::Status status)
// ================================================================================
CleanupPollsJob::~CleanupPollsJob()
{
}
CleanupPollsJob::~CleanupPollsJob() = default;
void CleanupPollsJob::start()
{

View file

@ -113,9 +113,7 @@ ProgressDispatcher::ProgressDispatcher(QObject *parent)
{
}
ProgressDispatcher::~ProgressDispatcher()
{
}
ProgressDispatcher::~ProgressDispatcher() = default;
void ProgressDispatcher::setProgressInfo(const QString &folder, const ProgressInfo &progress)
{

View file

@ -50,9 +50,7 @@ Theme *Theme::instance()
return _instance;
}
Theme::~Theme()
{
}
Theme::~Theme() = default;
QString Theme::statusHeaderText(SyncResult::Status status) const
{