QFileSystemMetaData: initialize integral members in-class
Safer, this way ensures we don't have undefined behavior if one of those members is returned from a method before being initialized. Change-Id: I30da1837cea960d43b55259a3906d1aecbf722f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
b82c5f9b7f
commit
8e93099349
@ -207,7 +207,7 @@ private:
|
||||
MetaDataFlags knownFlagsMask;
|
||||
MetaDataFlags entryFlags;
|
||||
|
||||
qint64 size_;
|
||||
qint64 size_ = 0;
|
||||
|
||||
// Platform-specific data goes here:
|
||||
#if defined(Q_OS_WIN)
|
||||
@ -218,13 +218,13 @@ private:
|
||||
FILETIME lastWriteTime_;
|
||||
#else
|
||||
// msec precision
|
||||
qint64 accessTime_;
|
||||
qint64 birthTime_;
|
||||
qint64 metadataChangeTime_;
|
||||
qint64 modificationTime_;
|
||||
qint64 accessTime_ = 0;
|
||||
qint64 birthTime_ = 0;
|
||||
qint64 metadataChangeTime_ = 0;
|
||||
qint64 modificationTime_ = 0;
|
||||
|
||||
uint userId_;
|
||||
uint groupId_;
|
||||
uint userId_ = (uint) -2;
|
||||
uint groupId_ = (uint) -2;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user