diff options
author | João Abecasis <joao@abecasis.name> | 2009-06-29 13:42:43 +0200 |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-06-29 18:14:03 +0200 |
commit | ccd06993cbb00058c937f28e8aa17dab87b448de (patch) | |
tree | e5db7d230c8c2df57c89a19e5c4cdd06fa9d13a6 /src/corelib | |
parent | 02ed2cd9ddf57ee9daadbfc76e6b73dbd4165583 (diff) | |
download | qt4-tools-ccd06993cbb00058c937f28e8aa17dab87b448de.tar.gz |
QTemporaryFile: Report the user-provided openMode
Reviewed-by: Thiago
Diffstat (limited to 'src/corelib')
-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 a735ddac5a..2d2db7dacf 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -341,6 +341,8 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode) Q_D(QFSFileEngine); Q_ASSERT(!isReallyOpen()); + openMode |= QIODevice::ReadWrite; + if (!filePathIsTemplate) return QFSFileEngine::open(openMode); @@ -758,7 +760,6 @@ bool QTemporaryFile::open(OpenMode flags) } } - flags |= QIODevice::ReadWrite; if (QFile::open(flags)) { d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName); return true; |