summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.5Sergio Ahumada2012-11-2865-1170/+1170
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I9f5c8a9135271161e2bce50bc413ea01a08c3a76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update license headers again.Jason McDonald2009-09-0865-260/+260
| | | | Reviewed-by: Trust Me
* Reset QTemporaryFile's state after failed open() on WindowsJoão Abecasis2009-08-311-8/+30
| | | | | | | | | | | | | | | | | This fixes a regression introduced in 4.5.2 where QTemporaryFile would no longer attempt to generate a random name after a failed open. Under certain situations, this led to a non-random file being left behind in QDir::tempPath when using the fallback implementation of QFile::copy. Avoid calling QFSFileEngine::setFileName() on a template, so as not to process it as file name. By consistently not calling setFileTemplate in the constructor, we also delay allocation of the fileEngine. Changes made to that function also keep it from unnecessarily allocating the fileEngine. Task-number: 260165 Reviewed-by: Thiago Macieira
* Update tech preview license header.Jason McDonald2009-08-3165-845/+845
| | | | Reviewed-by: Trust Me
* Qt's domain name is now qt.nokia.com.Jason McDonald2009-08-111-4/+4
| | | | Reviewed-by: Trust Me
* Update license headers.Jason McDonald2009-08-1165-65/+65
| | | | Reviewed-by: Trust Me
* QDirIterator: Doc fixes and whitespace cleanupJoão Abecasis2009-07-171-19/+12
| | | | | | There is no QDirIterator::isValid() function. Reviewed-by: David Boddie
* Refactoring QDirIteratorPrivate::pushSubDirectoryJoão Abecasis2009-07-171-26/+15
| | | | | | | | | | | | | | pushSubDirectory was operating on nextFileInfo when it should really be using the path received as argument. This fixes an issue introduced when currentFilePath variable was removed, that was exposed in the auto-tests; fixes a regression introduced in 4.5.0 -- test case a couple of commits back. This also allows refactoring calling code and avoid repetition. Task-number: 258230 Reviewed-by: Olivier Goffart
* QDirIterator: reducing "randomness"João Abecasis2009-07-171-10/+3
| | | | | | | | | | | | The difference between a canonical and absolute paths is subtle, and not what QDirIterator is about. With this change, we still avoid loops generated by symbolic links but won't duplicate entries because of these differences. While at it, when avoiding loops with symbolic links, please don't mess with the next path! That only added inconsistency. Reviewed-by: Olivier Goffart
* QDirIterator was returning inconsistent dataJoão Abecasis2009-07-171-6/+1
| | | | | | | One less variable to maintain reduces the number of bugs and improves consistency. Reviewed-by: Olivier Goffart
* Fix oops in strcmp in QBuffer.Thiago Macieira2009-07-021-1/+1
| | | | | | Reported via qt-bugs. Reviewed-By: Peter Hartmann
* QTemporaryFile: Report the user-provided openModeJoão Abecasis2009-06-291-1/+2
| | | | Reviewed-by: Thiago
* 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