diff options
author | João Abecasis <joao@abecasis.name> | 2009-05-18 10:40:01 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-05-22 12:33:42 (GMT) |
commit | cfa01206e38d120c0ddb17aec7358aadff30b6f5 (patch) | |
tree | 44c1b74bccb3b7be4e5aa78ce99de070642e4e64 /src/corelib/io/qtemporaryfile.cpp | |
parent | 662e8997e9777c6661dde2134e43e35963a12cb6 (diff) | |
download | Qt-cfa01206e38d120c0ddb17aec7358aadff30b6f5.zip Qt-cfa01206e38d120c0ddb17aec7358aadff30b6f5.tar.gz Qt-cfa01206e38d120c0ddb17aec7358aadff30b6f5.tar.bz2 |
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 b0809c6..11e88e2 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); } |