summaryrefslogtreecommitdiff
path: root/src/corelib/io/qtemporaryfile.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-05-18 12:40:01 +0200
committerJoão Abecasis <joao@abecasis.name>2009-05-22 14:33:42 +0200
commitcfa01206e38d120c0ddb17aec7358aadff30b6f5 (patch)
tree44c1b74bccb3b7be4e5aa78ce99de070642e4e64 /src/corelib/io/qtemporaryfile.cpp
parent662e8997e9777c6661dde2134e43e35963a12cb6 (diff)
downloadqt4-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.cpp3
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);
}