summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers as requested by the marketing department.Jason McDonald2009-06-1665-130/+130
| | | | Reviewed-by: Trust Me
* QFile: Doc was pointing to deprecated QIODevice::isSequentialAccess()Markus Goetz2009-06-151-1/+1
| | | | | | Changed to QIODevice::isSequential() Reviewed-by: TrustMe
* Fixed aliasing pointer corruption in QDataStream.Trond Kjernaasen2009-05-271-15/+77
| | | | | | | | | | | Use a union instead of an unsafe cast when swapping the bytes in the QDataStream streaming operators. The old seems to cause problems with Link Time Code Generation optimizations with the MSVC compilers. Task-number: 247708 Reviewed-by: Samuel Reviewed-by: Thiago BT: yes
* Adding details to QSettings functionsMorten Engvoldsen2009-05-251-2/+11
| | | | | | | | | | Adding details to the documentation of custom storage format and related functions. Task-number: 207865 Rev-by: David Boddie Rev-by: Marius Storm-Olsen
* qdoc: Added some missing qdoc comments.Martin Smith2009-05-251-1/+1
| | | | Task-number: 252491
* Fix syntax of the fcntl system call: this is not setsockoptThiago Macieira2009-05-221-6/+3
| | | | Reviewed-By: Oswald Buddenhagen
* Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Martin Smith2009-05-224-51/+107
|\
| * Fixed compilation with -qtnamespaceMarkus Goetz2009-05-221-1/+3
| | | | | | | | | | Task-number: 254333 Reviewed-by: Andy Shaw <qt-info@nokia.com>
| * Reset openMode to NotOpen when returning false from QFile::open()João Abecasis2009-05-221-0/+9
| | | | | | | | | | | | | | When connecting to an open file descriptor, set the openMode in the file system engine, as is done for file handles. Reviewed-by: Thiago
| * QTemporaryFile: really close files before renamingJoão Abecasis2009-05-221-0/+7
| | | | | | | | | | | | | | | | | | | | This gets temporary file renaming working on Windows, without requiring block-copying. While we could #ifdef this behavior for Windows, it's preferrable to maintain consistency in the exposed interface. Reviewed-by: Thiago
| * QTemporaryFileEngine now tracks if a fileName has been generatedJoão Abecasis2009-05-221-3/+18
| | | | | | | | | | | | | | | | | | | | | | With recent changes to QTemporaryFile, allowing the file to be closed, the engine has to keep track of whether a fileName has already been generated, so we don't generate new files after the first one. If the file is closed but we already have a name for it, then just forward the call to the base file engine. Reviewed-by: Thiago
| * QTemporaryFile: there's no need to keep another pointer to the engine hereJoão Abecasis2009-05-221-4/+1
| | | | | | | | | | | | Lifetime of the engine is already handled by the native engine. Reviewed-by: Thiago
| * QTemporaryFile: really (re)open file if it has been really closed...João Abecasis2009-05-221-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | In some circumstances, the file descriptor in QTemporaryFile is actually closed and setOpenMode alone won't give us reOpen semantics. Added function to QTemporaryFileEngine that checks if we have open file handles. On open, if we currently hold no handles, re-open the file. Trying to open a new file while we hold open handles would lead to leaks, so added an assert there, to be on the safe side. Reviewed-by: Thiago
| * Unconditionally open temporary files in ReadWrite modeJoão Abecasis2009-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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
| * QTemporaryFile: handle failures from QFSFileEngine::open(mode, fd)João Abecasis2009-05-221-9/+11
| | | | | | | | | | | | | | | | For now, this only happens if Append mode is requested and we're unable to seek to the end of the file. Theoretically, this could change in the future so it's better to err on the safe side. Reviewed-by: Thiago
| * Documentation fixJoão Abecasis2009-05-221-2/+2
| | | | | | | | | | | | | | | | We souldn't be returning an empty string for the fileName, just because the file is closed. E.g., after a rename, the file will be closed, but should still have a name. Reviewed-by: Thiago
| * QTemporaryFile would forget fileName while file was "closed"João Abecasis2009-05-221-1/+2
| | | | | | | | | | | | | | Note: this showed even if the file descriptor was kept open. Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| * QTemporaryFile: don't clear filePath if remove failsJoão Abecasis2009-05-221-3/+5
| | | | | | | | | | | | Reviewed-by: MariusSO Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| * QFile::rename fallback: reset permissions and error state on successJoão Abecasis2009-05-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fallback implementation for rename operation should try to copy permissions from the original file to the destination file. Note that failures at this point are not treated as errors. Errors previously set by the native fileEngine are also reset before returning. Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| * QFile::copy: close source file when using fallback mechanismJoão Abecasis2009-05-221-0/+1
| | | | | | | | | | | | | | Also added check in test case for rename fallback. Task-number: 165920 Reviewed-by: Thiago
| * Allow renaming QTemporaryFiles on windowsJoão Abecasis2009-05-221-9/+10
| | | | | | | | | | | | | | | | | | | | Changed the fallback implementation to use 'this' instead of a new QFile. This allows a QTemporaryFile to be block-copied to the destination and the source to be removed (QTemporaryFile is special because it isn't really closed). Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| * Don't block copy sequential files in QFile::renameJoão Abecasis2009-05-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Block copying a sequential file is potentially a destructive operation, because there is no guarantee copy+remove will succeed. In these cases the fallback should not be tried. The user is better equipped to decide how to handle such failures and to ensure no data losses occur, e.g., copy without removing the original file. Reviewed-by: MariusSO Reviewed-by: Peter Hartmann Reviewed-by: Thiago
| * Don't loop around sigaction because it can't return EINTR.Thiago Macieira2009-05-221-16/+7
| | | | | | | | | | | | Asked by Oswald. Reviewed-by: Oswald Buddenhagen
* | qdoc: Moved some qdoc comments into the .cpp file common to all packages.Martin Smith2009-05-222-83/+113
|/ | | | Task-number: 252494
* Optimize QIoDevice::readAll() to possibly do less (re)allocationsMarkus Goetz2009-05-201-3/+4
| | | | | | Reviewed-by: Olivier Goffart Reviewed-by: Peter Hartmann Reviewed-by: João Abecasis
* Fix stopping link loops in QDirIterator on WindowsEskil Abrahamsen Blomfeldt2009-05-191-2/+2
| | | | | | | | | | currentFileInfo is only used for returning from the public functions since the file info used in the algorithm is one step ahead. nextFileInfo is the one actually used in the algorithm. The bug was introduced in a compile fix for Windows and broke the stopLinkLoop test for QDirIterator. Reviewed-by: Olivier
* Clearifying QUrl docsMorten Engvoldsen2009-05-191-0/+6
| | | | | | | | Adding more details on QUrl::addQueryItem() Task-number: 234125 Rev-by: Thiago Macieira
* Replace all occurences of "heirarchy" with "hierarchy"Andre Haupt2009-05-181-1/+1
| | | | | Signed-off-by: Andre Haupt <andre@bitwigglers.org> Reviewed-By: Thiago Macieira
* Fix some typos in the documentation.Frederik Schwarzer2009-05-181-1/+1
| | | | | | Usually, "the the" is not proper English Reviewed-By: Thiago Macieira
* QFSFileEngine: Fix access to uninitialized memoryJoão Abecasis2009-05-111-1/+1
| | | | Reviewed-by: Peter Hartmann
* QDataStream: Small doc errorMarkus Goetz2009-05-081-1/+1
| | | | | Task-number: 253179 Reviewed-by: TrustMe
* Fix leak of file descriptors in QTemporaryFileJoão Abecasis2009-05-081-0/+9
| | | | | | | | | | | Using setFileName in QFile::copy (introduced recently) has a nasty side-effect of leaking file descriptors in QTemporaryFile. This happens because the code assumes the file has been closed. In QTemporaryFile, we need to explicitly call native file engine close. Test case by Thiago. Bug report from Arora developers. Reviewed-by: thiago
* Added further explanation on the note about stdin and QTextsStream::atEnd()Morten Engvoldsen2009-05-081-2/+4
| | | | | | | Explained why you cannot use stdin and atEnd() together. Task-number:251171 Rev-by: Andreas Aardal Hanssen
* Fixes QDir not reentrantOlivier Goffart2009-05-081-29/+18
| | | | | | | | | | qt_cmp_si_sort_flags could be read and written from different threads. Use qStableSort with functor instead of libc's quicksort. Found with helgrind on kdevelop Reviewed-by: Marius Storm-Olsen
* Revert "Added comment to QTextStream - clarification of the documentation"Morten Engvoldsen2009-05-081-2/+1
| | | | This reverts commit da1416cef6b1d24156739ded101df895ee4e80d9.
* Added comment to QTextStream - clarification of the documentationMorten Engvoldsen2009-05-061-1/+2
| | | | | | Explained why you cannot use QTextStream::atEnd with stdin. Task-number:251171
* performance improvement of isUncRoot in qfsfileengine_win.cppJoerg Bornemann2009-04-281-2/+9
| | | | | | | We always called QStringList::split in this function, which was just expensive. Reviewed-by: mauricek
* Make temporary files close-on-execOswald Buddenhagen2009-04-181-0/+11
| | | | Reviewed-By: thiago
* sanitize whitespace & parenthesesOswald Buddenhagen2009-04-181-128/+127
|
* fix reading problem on 64-bit machines in QProcess and socket enginePeter Hartmann2009-04-162-5/+5
| | | | | | | | | | QProcessPrivate and QNativeSocketEnginePrivate were reporting a wrong number of bytes available on 64-bit machines, due to use of size_t in ioctl. That was required by Irix, which we dropped support for, so we can also drop size_t Reviewed-by: Thiago Task-number: 249537
* Silence warning about unused static function on WindowsJoão Abecasis2009-04-151-0/+2
| | | | Reviewed-by: mariusSO
* Doc - clarified that on Windows, for 32-bit programs running in WOW64Kavindra Devi Palaraja2009-04-151-0/+4
| | | | | | | | mode, the settings are stored in HKEY_LOCAL_MACHINE\Software\WOW6432node. Task-number: 232011 Reviewed-by: Martin Petersson <martin.petersson@trolltech.com>
* Delete temporary file if copy was unsuccessfulJoão Abecasis2009-04-021-1/+4
| | | | | | | | | | | This is an untested bugfix -- comes solely from reading the code. In QFile::copy's fallback implementation a (temporary) file is created for block copying from the source file. When Qt is built without temporary file support this doesn't seem to be deleted in case of an error while block copying or renaming to the final destination. Reviewed-by: mariusSO
* Renaming a file does not change QFile's fileNameJoão Abecasis2009-04-021-0/+5
| | | | | | | | | | QFile made no attempt to reset the file name on a rename. We now reset the fileEngine's fileName if it was able to handle the rename. Otherwise, we call setFileName, which will result in reallocation of the fileEngine. Task-number: 244485 Reviewed-by: mariusSO
* QFile::rename didn't always return false when method failedJoão Abecasis2009-04-021-3/+9
| | | | | | | | | The fallback implementation for rename would return true in some situations where the move failed. Also the destination file might be created and left there in these cases. Task-number: 244500 Reviewed-by: mariusSO
* Subject: Compile fix on WindowsAndy Shaw2009-03-311-2/+2
| | | | Reviewed-by: Anders Bakken <anders.bakken@nokia.com>
* Doc: Made it clearer that QProcess::start() only starts a new process if one ↵David Boddie2009-03-311-9/+16
| | | | | | | is not already running. Task-number: 231513 Reviewed-by: TrustMe
* QProcess::start() segfaults on empty programBradley T. Hughes2009-03-311-0/+9
| | | | | | | | Handle cases where QProcess::start() and startDetached() are passed a null, empty, or "invalid" program string instead of crashing. Task-number: 247865 Reviewed-by: Andreas Aardal Hanssen
* Fix bug in QDirIterator that clear the cache of the fileinfoAlexis Menard2009-03-311-17/+17
| | | | | | | | We basically store the currentFileInfo and use another one to continue moving into the dir. Task-number: 247645 Reviewed-by: Olivier
* Doc: Swapping \a with \c to fix a qdoc warningKavindra Devi Palaraja2009-03-301-1/+1
|