diff options
author | João Abecasis <joao@abecasis.name> | 2009-05-18 12:40:01 +0200 |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-05-22 14:33:42 +0200 |
commit | cfa01206e38d120c0ddb17aec7358aadff30b6f5 (patch) | |
tree | 44c1b74bccb3b7be4e5aa78ce99de070642e4e64 /src/corelib/io/qtemporaryfile.cpp | |
parent | 662e8997e9777c6661dde2134e43e35963a12cb6 (diff) | |
download | qt4-tools-cfa01206e38d120c0ddb17aec7358aadff30b6f5.tar.gz |
QTemporaryFile would forget fileName while file was "closed"
Note: this showed even if the file descriptor was kept open.
Reviewed-by: Peter Hartmann
Reviewed-by: Thiago
Diffstat (limited to 'src/corelib/io/qtemporaryfile.cpp')
-rw-r--r-- | src/corelib/io/qtemporaryfile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index b0809c6348..11e88e2adb 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -603,7 +603,8 @@ void QTemporaryFile::setAutoRemove(bool b) QString QTemporaryFile::fileName() const { - if(!isOpen()) + Q_D(const QTemporaryFile); + if(d->fileName.isEmpty()) return QString(); return fileEngine()->fileName(QAbstractFileEngine::DefaultName); } |