diff options
Diffstat (limited to 'src/corelib/io/qfileinfo.cpp')
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 4f1b943..3442a1e 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -59,7 +59,6 @@ QFileInfoPrivate::QFileInfoPrivate(const QFileInfo *copy) data = copy->d_func()->data; } else { data = new QFileInfoPrivate::Data; - data->clear(); } } @@ -134,11 +133,11 @@ void QFileInfoPrivate::detach() QString QFileInfoPrivate::getFileName(QAbstractFileEngine::FileName name) const { - if(data->cache_enabled && data->fileNames.contains((int)name)) - return data->fileNames.value(name); + if(data->cache_enabled && !data->fileNames[(int)name].isNull()) + return data->fileNames[(int)name]; QString ret = data->fileEngine->fileName(name); if(data->cache_enabled) - data->fileNames.insert((int)name, ret); + data->fileNames[(int)name] = ret; return ret; } |