summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-06-29 11:42:43 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-06-29 16:14:03 (GMT)
commitccd06993cbb00058c937f28e8aa17dab87b448de (patch)
treee5db7d230c8c2df57c89a19e5c4cdd06fa9d13a6 /src/corelib/io
parent02ed2cd9ddf57ee9daadbfc76e6b73dbd4165583 (diff)
downloadQt-ccd06993cbb00058c937f28e8aa17dab87b448de.zip
Qt-ccd06993cbb00058c937f28e8aa17dab87b448de.tar.gz
Qt-ccd06993cbb00058c937f28e8aa17dab87b448de.tar.bz2
QTemporaryFile: Report the user-provided openMode
Reviewed-by: Thiago
Diffstat (limited to 'src/corelib/io')
-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 a735dda..2d2db7d 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;