summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2010-01-26 16:26:47 (GMT)
committerJoão Abecasis <joao@trolltech.com>2010-01-26 16:26:47 (GMT)
commit95f0dbd76f419ebc80e27f184d5e1199e91de4b7 (patch)
tree7b76a185fe171ad17a4496fbb0099a70f9a3c14c
parentc3619bce443e73430b1b8aa7ab4c0e712375b53b (diff)
downloadQt-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.h10
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 &copy)
: 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;