Use = default for trivial ctors and dtors
authorKevin Ottens <kevin.ottens@nextcloud.com>
Mon, 25 May 2020 19:33:24 +0000 (21:33 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Mon, 25 May 2020 19:33:24 +0000 (21:33 +0200)
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
22 files changed:
src/common/checksums.cpp
src/csync/csync_exclude.cpp
src/gui/accountstate.cpp
src/gui/creds/flow2auth.cpp
src/gui/creds/oauth.cpp
src/gui/folderstatusmodel.cpp
src/gui/folderwatcher.cpp
src/gui/folderwatcher_linux.cpp
src/gui/folderwizard.cpp
src/gui/logbrowser.cpp
src/gui/synclogdialog.cpp
src/gui/syncrunfilelog.cpp
src/gui/wizard/owncloudsetuppage.cpp
src/gui/wizard/owncloudwizardresultpage.cpp
src/libsync/account.cpp
src/libsync/bandwidthmanager.cpp
src/libsync/clientsideencryption.cpp
src/libsync/cookiejar.cpp
src/libsync/networkjobs.cpp
src/libsync/owncloudpropagator.cpp
src/libsync/progressdispatcher.cpp
src/libsync/theme.cpp

index 566c84ad7de7080dfcfc124d88a802c38cd75572..3099c24fbfac2db1ee36ccac706e7dd9eafc7b10 100644 (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*/)
 {
index d20e8f49d3db690f1781a07b303ff2b9b681c08d..dadd611bfde5abf990064a786097eb131f420f3d 100644 (file)
@@ -261,9 +261,7 @@ ExcludedFiles::ExcludedFiles(QString localPath)
         addInTreeExcludeFilePath(fi.absoluteFilePath());
 }
 
-ExcludedFiles::~ExcludedFiles()
-{
-}
+ExcludedFiles::~ExcludedFiles() = default;
 
 void ExcludedFiles::addExcludeFilePath(const QString &path)
 {
index 6802dcf7f854fcb79f9d94caf299ef445be8ebc8..be7aa58327f3113413110f98abf4ab1c0ceb240f 100644 (file)
@@ -57,9 +57,7 @@ AccountState::AccountState(AccountPtr account)
     _timeSinceLastETagCheck.invalidate();
 }
 
-AccountState::~AccountState()
-{
-}
+AccountState::~AccountState() = default;
 
 AccountState *AccountState::loadFromSettings(AccountPtr account, QSettings & /*settings*/)
 {
index e75a8c9bf5bb182a13bd83c2c1dfad6a478ea579..b4e826d46bd2b22de53e95e29fdd11427fddeb22 100644 (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()
 {
index 9870fcd35e43059ef81d7724b376b1f7f7494827..fa040955fccf91b7c01d49a862b9539956ccc373 100644 (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)
index ef773f555c69da7567e11b551f6f240ab3130e75..ef200277a869f1bb8d49562a336d98a361270296 100644 (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)
 {
index 65e68cb36fbf8720d7729613aad713ea99ed927d..d73e913f5829d5996a7afc440d069792b6ad6604 100644 (file)
@@ -44,9 +44,7 @@ FolderWatcher::FolderWatcher(Folder *folder)
 {
 }
 
-FolderWatcher::~FolderWatcher()
-{
-}
+FolderWatcher::~FolderWatcher() = default;
 
 void FolderWatcher::init(const QString &root)
 {
index 2929a9ff8fe27d00ff496c143e58c9d2abe75ea1..c048a552daafd8442c033470438bcf6fdd5da436 100644 (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)
index 1f51a30208379b169a26d3b8f859ac964066d0d6..6e1ca4790db319432d610e56a79be0e7842e0255 100644 (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)
 {
index 691ed2373a98ec10fdb889ddddd18b659575ee32..52119b7542a465cb1b0fe9faf671668fa1c8f1cb 100644 (file)
@@ -143,9 +143,7 @@ LogBrowser::LogBrowser(QWidget *parent)
     _logWidget->document()->setMaximumBlockCount(lines);
 }
 
-LogBrowser::~LogBrowser()
-{
-}
+LogBrowser::~LogBrowser() = default;
 
 void LogBrowser::showEvent(QShowEvent *)
 {
index 85f043f1aa4b67b32e94a7703a785a2be13f4c49..ce355aa789feda55691f199c7cbb61f9894a24e2 100644 (file)
@@ -41,7 +41,5 @@ SyncLogDialog::SyncLogDialog(QWidget *parent)
     }
 }
 
-SyncLogDialog::~SyncLogDialog()
-{
-}
+SyncLogDialog::~SyncLogDialog() = default;
 }
index e493918e17ba0b010c24bcfdbabbbdf81ea1dd18..ff913f64e511d6d4fc3bc6d7fb9ed9c502588245 100644 (file)
@@ -21,9 +21,7 @@
 
 namespace OCC {
 
-SyncRunFileLog::SyncRunFileLog()
-{
-}
+SyncRunFileLog::SyncRunFileLog() = default;
 
 QString SyncRunFileLog::dateTimeStr(const QDateTime &dt)
 {
index 954e3f47ba5c1758a7aa055eaed360f014752ce7..d0a41e43c9c80424b5e732d4b594e0dd1fedf86f 100644 (file)
@@ -416,9 +416,7 @@ void OwncloudSetupPage::slotCertificateAccepted()
     }
 }
 
-OwncloudSetupPage::~OwncloudSetupPage()
-{
-}
+OwncloudSetupPage::~OwncloudSetupPage() = default;
 
 void OwncloudSetupPage::slotStyleChanged()
 {
index 79446de376975f5913b268f9fc4af59ad7d57d5b..c7f0ad616c117d279263e4f951efd0ca251100d1 100644 (file)
@@ -54,9 +54,7 @@ OwncloudWizardResultPage::OwncloudWizardResultPage()
     setupCustomization();
 }
 
-OwncloudWizardResultPage::~OwncloudWizardResultPage()
-{
-}
+OwncloudWizardResultPage::~OwncloudWizardResultPage() = default;
 
 void OwncloudWizardResultPage::setComplete(bool complete)
 {
index 6908cd3b0ff3d10c1fa32f7f7de8c01739eddff5..692b86a7ae7b5fd74c3d08d99ce4c34b30ee0326 100644 (file)
@@ -75,9 +75,7 @@ ClientSideEncryption* Account::e2e()
     return &_e2e;
 }
 
-Account::~Account()
-{
-}
+Account::~Account() = default;
 
 QString Account::davPath() const
 {
index 95564bb7b4c2ad049939bccd12a0c3a96dc545ba..d177a6275aefa576797abcfb776dbc96effe4a78 100644 (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)
 {
index 151ebcabd6670cf02096dd1805e5605178cefd85..33fbd4d9c025d5f8b6ecdb5e091bb6e81e6c4333 100644 (file)
@@ -610,9 +610,7 @@ QByteArray encryptStringAsymmetric(EVP_PKEY *publicKey, const QByteArray& data)
 }
 
 }
-ClientSideEncryption::ClientSideEncryption()
-{
-}
+ClientSideEncryption::ClientSideEncryption() = default;
 
 void ClientSideEncryption::setAccount(AccountPtr account)
 {
index 615220e8ddcfa2b26757527ef6282a1645d3300c..9824aab5d2501a8c821a2121100158693bbdba84 100644 (file)
@@ -71,9 +71,7 @@ CookieJar::CookieJar(QObject *parent)
 {
 }
 
-CookieJar::~CookieJar()
-{
-}
+CookieJar::~CookieJar() = default;
 
 bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieList, const QUrl &url)
 {
index c1bf86d4211825797f68f6cb601498f675cd21c6..bd385865081c741d493a7a97245e23cdabaed8c1 100644 (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)
 {
index 1120681456b5b8c4d6ecd1f7e5f37c1b056f7fbf..7a1274bd73e5dccb01c09930071a81dfaa7ec35c 100644 (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()
 {
index 179d283193ddd0b718900db9b024a97b889e77a8..518bd9ec0299cdd3f8d8c91332c7442a60e9aa92 100644 (file)
@@ -113,9 +113,7 @@ ProgressDispatcher::ProgressDispatcher(QObject *parent)
 {
 }
 
-ProgressDispatcher::~ProgressDispatcher()
-{
-}
+ProgressDispatcher::~ProgressDispatcher() = default;
 
 void ProgressDispatcher::setProgressInfo(const QString &folder, const ProgressInfo &progress)
 {
index 48ceb5f93c731d64b14bdc3a55946f3dfd8cf78c..11d7a10652ebdc997b1e7a6f9078336ada5c6208 100644 (file)
@@ -50,9 +50,7 @@ Theme *Theme::instance()
     return _instance;
 }
 
-Theme::~Theme()
-{
-}
+Theme::~Theme() = default;
 
 QString Theme::statusHeaderText(SyncResult::Status status) const
 {