From: Stephan Beyer Date: Wed, 20 May 2020 23:43:34 +0000 (+0200) Subject: Use default member initializers in OCC::FolderStatusModel sub-structs X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~221^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=faeb233a74726d2312300b56105584e92b3b26df;p=nextcloud-desktop.git Use default member initializers in OCC::FolderStatusModel sub-structs This allows to remove their explicit default constructor definitions. Signed-off-by: Stephan Beyer --- diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index 6458a1224..457e337d1 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -58,35 +58,24 @@ public: struct SubFolderInfo { - SubFolderInfo() - : _folder(nullptr) - , _size(0) - , _isExternal(false) - , _fetched(false) - , _hasError(false) - , _fetchingLabel(false) - , _isUndecided(false) - , _checked(Qt::Checked) - { - } - Folder *_folder; + Folder *_folder = nullptr; QString _name; QString _path; QVector _pathIdx; QVector _subs; - qint64 _size; - bool _isExternal; + qint64 _size = 0; + bool _isExternal = false; - bool _fetched; // If we did the LSCOL for this folder already + bool _fetched = false; // If we did the LSCOL for this folder already QPointer _fetchingJob; // Currently running LsColJob - bool _hasError; // If the last fetching job ended in an error + bool _hasError = false; // If the last fetching job ended in an error QString _lastErrorString; - bool _fetchingLabel; // Whether a 'fetching in progress' label is shown. + bool _fetchingLabel = false; // Whether a 'fetching in progress' label is shown. // undecided folders are the big folders that the user has not accepted yet - bool _isUndecided; + bool _isUndecided = false; QByteArray _fileId; // the file id for this folder on the server. - Qt::CheckState _checked; + Qt::CheckState _checked = Qt::Checked; // Whether this has a FetchLabel subrow bool hasLabel() const; @@ -96,19 +85,14 @@ public: struct Progress { - Progress() - : _warningCount(0) - , _overallPercent(0) - { - } bool isNull() const { return _progressString.isEmpty() && _warningCount == 0 && _overallSyncString.isEmpty(); } QString _progressString; QString _overallSyncString; - int _warningCount; - int _overallPercent; + int _warningCount = 0; + int _overallPercent = 0; }; Progress _progress; };