| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
| |
Changed to QIODevice::isSequential()
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
| |
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 the documentation of custom storage format and related functions.
Task-number: 207865
Rev-by: David Boddie
Rev-by: Marius Storm-Olsen
|
|
|
|
| |
Task-number: 252491
|
|
|
|
| |
Reviewed-By: Oswald Buddenhagen
|
|\ |
|
| |
| |
| |
| |
| | |
Task-number: 254333
Reviewed-by: Andy Shaw <qt-info@nokia.com>
|
| |
| |
| |
| |
| |
| |
| | |
When connecting to an open file descriptor, set the openMode in the file
system engine, as is done for file handles.
Reviewed-by: Thiago
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
Lifetime of the engine is already handled by the native engine.
Reviewed-by: Thiago
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
Note: this showed even if the file descriptor was kept open.
Reviewed-by: Peter Hartmann
Reviewed-by: Thiago
|
| |
| |
| |
| |
| |
| | |
Reviewed-by: MariusSO
Reviewed-by: Peter Hartmann
Reviewed-by: Thiago
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
Also added check in test case for rename fallback.
Task-number: 165920
Reviewed-by: Thiago
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
Asked by Oswald.
Reviewed-by: Oswald Buddenhagen
|
|/
|
|
| |
Task-number: 252494
|
|
|
|
|
|
| |
Reviewed-by: Olivier Goffart
Reviewed-by: Peter Hartmann
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Adding more details on QUrl::addQueryItem()
Task-number: 234125
Rev-by: Thiago Macieira
|
|
|
|
|
| |
Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Reviewed-By: Thiago Macieira
|
|
|
|
|
|
| |
Usually, "the the" is not proper English
Reviewed-By: Thiago Macieira
|
|
|
|
| |
Reviewed-by: Peter Hartmann
|
|
|
|
|
| |
Task-number: 253179
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Explained why you cannot use stdin and atEnd() together.
Task-number:251171
Rev-by: Andreas Aardal Hanssen
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This reverts commit da1416cef6b1d24156739ded101df895ee4e80d9.
|
|
|
|
|
|
| |
Explained why you cannot use QTextStream::atEnd with stdin.
Task-number:251171
|
|
|
|
|
|
|
| |
We always called QStringList::split in this function, which was
just expensive.
Reviewed-by: mauricek
|
|
|
|
| |
Reviewed-By: thiago
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed-by: mariusSO
|
|
|
|
|
|
|
|
| |
mode, the settings are stored in
HKEY_LOCAL_MACHINE\Software\WOW6432node.
Task-number: 232011
Reviewed-by: Martin Petersson <martin.petersson@trolltech.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed-by: Anders Bakken <anders.bakken@nokia.com>
|
|
|
|
|
|
|
| |
is not already running.
Task-number: 231513
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
We basically store the currentFileInfo and use another one to continue
moving into the dir.
Task-number: 247645
Reviewed-by: Olivier
|
| |
|