diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2010-01-26 16:26:47 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-26 16:26:47 (GMT) |
commit | 95f0dbd76f419ebc80e27f184d5e1199e91de4b7 (patch) | |
tree | 7b76a185fe171ad17a4496fbb0099a70f9a3c14c | |
parent | c3619bce443e73430b1b8aa7ab4c0e712375b53b (diff) | |
download | Qt-95f0dbd76f419ebc80e27f184d5e1199e91de4b7.zip Qt-95f0dbd76f419ebc80e27f184d5e1199e91de4b7.tar.gz Qt-95f0dbd76f419ebc80e27f184d5e1199e91de4b7.tar.bz2 |
QFileInfoPrivate::Data: don't call clear() from constructors
causes Refresh of file engine's internal cache, since `fileEngine'
member is set before clear() is called. Initialize members with default
values instead.
Merge-request: 446
Reviewed-by: João Abecasis <joao@trolltech.com>
-rw-r--r-- | src/corelib/io/qfileinfo_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/io/qfileinfo_p.h b/src/corelib/io/qfileinfo_p.h index 065f860..7f8ab4e 100644 --- a/src/corelib/io/qfileinfo_p.h +++ b/src/corelib/io/qfileinfo_p.h @@ -81,12 +81,14 @@ public: CachedSize =0x08 }; struct Data { inline Data() - : ref(1), fileEngine(0), cache_enabled(1), fileSize(0) - { clear(); } + : ref(1), fileEngine(0), + cachedFlags(0), cache_enabled(1), fileFlags(0), fileSize(0) + {} inline Data(const Data ©) : ref(1), fileEngine(QAbstractFileEngine::create(copy.fileName)), - fileName(copy.fileName), cache_enabled(copy.cache_enabled), fileSize(copy.fileSize) - { clear(); } + fileName(copy.fileName), + cachedFlags(0), cache_enabled(copy.cache_enabled), fileFlags(0), fileSize(0) + {} inline ~Data() { delete fileEngine; } inline void clearFlags() { fileFlags = 0; |