diff options
author | João Abecasis <joao@abecasis.name> | 2009-05-18 12:58:44 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-05-22 12:33:45 (GMT) |
commit | f1793cbff8aa9b4adcb5fd511e495f7e96811e2b (patch) | |
tree | 9d79221828ffe31ea252353b38d213c45ad5fbde /src | |
parent | 5cb1ed45ba55dbc9752e0f6f47cc6d1525464646 (diff) | |
download | Qt-f1793cbff8aa9b4adcb5fd511e495f7e96811e2b.zip Qt-f1793cbff8aa9b4adcb5fd511e495f7e96811e2b.tar.gz Qt-f1793cbff8aa9b4adcb5fd511e495f7e96811e2b.tar.bz2 |
Unconditionally open temporary files in ReadWrite mode
Although QTemporaryFile hides QFile::open(OpenMode), this function is
still available when accessing instance methods through the base class.
Unconditionally setting ReadWrite allows the temporary file to be
re-opened with different flags.
Task-number: 248223
Reviewed-by: Thiago
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qtemporaryfile.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index b6eff94..3f8f978 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -720,6 +720,7 @@ bool QTemporaryFile::open(OpenMode flags) return true; } + flags |= QIODevice::ReadWrite; if (QFile::open(flags)) { d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName); return true; |