| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
CreateFileMapping() returns NULL in case of an error.
The patch corrects the wrong testing on INVALID_HANDLE_VALUE, and sets
NULL for invalid handles.
Change-Id: Iaab4945ed88ee92bbf9a0871e95a5820dd1a56ed
(cherry-picked from qtbase/1a8f67938c4146614fec3788c7868dc1a314cc84)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
|
|
| |
Change-Id: Ie79dda5a48288a1d9cd4b7e0a7934ee9db48c953
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thomas Zander <zander@kde.org>
Reviewed-by: João Abecasis <joao@abecasis.name>
|
|
|
|
|
|
| |
Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
|
| |
Change copyrights and license headers from Nokia to Digia
Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Replace Nokia contact email address with Qt Project website.
- Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.
Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
|
|
|
|
|
|
|
|
|
| |
Simple search and replace. This commit doesn't touch 3rd-party files,
nor translations (where the change is not so simple and will be handled
in a separate commit).
Change-Id: I4e48513b8078a44a8cd272326685b25338890148
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The symbianFilePos variable was only initialised in the nativeOpen
function and not in the constructor called init(). Due to the fix
for QTBUG-4796, QTemporaryFile now bypasses the nativeOpen function.
Zero initialising in init() ensures it is always valid (it only needs
a non zero initialisation when opening a file for append, which is
still covered by nativeOpen)
Task-Number: QTBUG-21418
Reviewed-By: mread
|
| |
|
|
|
|
|
| |
Task-number: QT-5026
Reviewed-by: mread
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/gui/text/qrawfont.cpp
src/gui/text/qtextlayout.cpp
src/gui/util/qscroller.cpp
src/gui/widgets/qlineedit.cpp
|
| |
| |
| |
| |
| |
| |
| | |
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.
Reviewed-by: Trust Me
|
|/
|
|
|
| |
Conflicts:
doc/src/examples/maemovibration.qdoc
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/webkit/imageanalyzer/imageanalyzer.h
examples/webkit/imageanalyzer/mainwindow.h
mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
src/corelib/io/qfsfileengine_iterator_unix.cpp
src/corelib/io/qfsfileengine_iterator_win.cpp
src/corelib/kernel/qcoreapplication.cpp
src/network/access/qnetworkaccessdatabackend.cpp
src/plugins/bearer/connman/qconnmanservice_linux.cpp
src/plugins/platforms/openvglite/qwindowsurface_vglite.h
src/s60installs/bwins/QtCoreu.def
src/s60installs/eabi/QtCoreu.def
src/s60installs/s60installs.pro
tools/assistant/tools/assistant/helpviewer_qwv.h
tools/qdoc3/test/qt-html-templates.qdocconf
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QFile behaviour has been to not close file handles adopted by
open(FILE*, OpenMode) and open(int fd, OpenMode) functions. This is
inconvenient for frameworks which want to return an opened QFile to
the user. In this case it would be better to transfer ownership of the
handle to the QFile.
New overloads are added which take an additional parameter from the
QFile::FileHandleFlags flags. Currently only one bit is used to provide the
AutoCloseHandle option, but it is extensible.
The AutoCloseHandle option tells the QFile backend that it should
close the handle when close() is called, rather than the default
behaviour which remains to flush the handle and leave it open.
The DontCloseHandle option is the inverse of this, specifying the old
behaviour of flushing but not closing the file handle.
Symbian OS file handles are not compatible with int, they are an opaque
data type which contains two integers.
The first identifies to the kernel the file server session
The second identifies to the file server the subsession object (the file)
The reason for this is that it has a microkernel architecture, the
kernel has no support for files - all files and file systems are handled
by a user mode process called the "file server".
So for symbian, a new QFile::open() overload is added for adopting a
symbian RFile handle.
The API mirrors the existing API for POSIX file handles, but takes an
RFile reference rather than an integer file descriptor.
Task-number: QT-2924
Reviewed-by: joao
Reviewed-by: mread
Reviewed-by: Oswald Buddenhagen
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Memory mapping of RFile handles is not supported in current symbian OS
versions. However the "open C" libraries provide an emulated mmap()
implementation which was used by QFile::map in Qt 4.6 release.
To avoid breaking applications which rely on this function, QFile::map
will now open the file with open C as well in order to use that handle
to call mmap().
When symbian implements a file mapping API, we can switch the implementation
to use that for RFile handles.
Reviewed-By: joao
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The m_filePath should always have / as the separator, while m_nativeFilePath
should always have the native separator.
Almost every place the constructor is used, the path could be one passed
into an API from code outside our control.
So it's easier to do the path conversion in the constructor than to have to
remember to call fromNativeSeparators in every place a QFileSystemEntry is
constructed (especially since unix tests won't reveal any error)
Reviewed-By: joao
|
| |
| |
| |
| |
| |
| |
| | |
Enough functionality to be able to read/write files for the
tst_qfileinfo autotest to pass.
Reviewed-By: joao
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch contains several changes that needed to be done atomically.
The native file path im QFileSystemEntry is changed from 8 bit to 16 bit
character set.
QFsFileEngine has some new symbian specific code (as the unix code does
not compile with the above change), and forwards more calls to the new
QFileSystemEngine.
Unix implementations of link, rename and remove are moved to the unix
version of this class, so less ifdef'ing is needed.
Finally, io.pri now selects the _symbian.cpp source files instead of the
_unix.cpp equivalents when building for symbian.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This shuffles a lot of code out of QFSFileEngine. fillMetaData, however
is almost a reimplementation of the logic. Goals for this function are
to maximize data gathered and minimize file system queries.
Symbian had an optimization to lstat first and only stat again on links,
having noticed a lot of lstat were being done that weren't really
necessary. That optimization was also made in the new fillMetaData
function and extended to all platforms, whenever the LinkType attribute
is requested (QFSFileEngine will now typically request this in reply to
a fileFlags request).
We now try to cache all meta data we get from the file system, while
still requesting "refreshes" as often as we did before. Client code
going straight to QFileSystemEngine API can choose it's behaviour by
clearing and querying specific flags in the QFileSystemMetaData
instance.
Reviewed-by: Prasanth Ullattil
|
| |
| |
| |
| |
| |
| |
| | |
QFSFileEnginePrivate::canonicalized is now removed and spread out
over the qfsfileengine_unix.cpp and qfsfileengine.cpp
Reviewed-by: João Abecasis
|
| |
| |
| |
| | |
Reviewed-by: João Abecasis
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Moved it into QFileSystemEntry, instead.
For the time being, QFileSystemEntry may look like an unnecessary extra
layer of indirection. For the time being, this allows us to do some code
cleanup and de-duplication. It is also a stepping stone to becoming
completely independent of the current file engine abstraction.
Changes to QFileSystemEntry:
- native file path on Windows is now a QString, instead of a
QByteArray. Accordingly, constructors taking a QByteArray were
removed for these platforms.
- Encoding/decoding of file names uses QFile::encode/decodeName API,
instead of assuming local 8 bit. On Windows, UTF-16 is used for
native, as was being done in QFSFileEngine.
- new functions isRoot(), isDriveRoot() [Windows/Symbian], and path()
- convenience functions clear() and isEmpty() added to facilitate
porting.
Changes to QFSFileEngine (Windows):
- removed QFSFileEnginePrivate::sizeFdFh(): the function was broken
and never used, so might as well not get compiled in.
- repeated pattern for use of FindFirstFile/FindClose hidden away in a
static inline function.
- repeated and inconsistent conversions from QString to native file
paths reduced through the use of QFileSystemEntry.
Done-with: Prasanth Ullattil
Done-with: Thomas Zander
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
if current directory is a symlink to another directory
on the same drive (the simplest example; say, c:\current\dir
is a symlink to c:\target) then the first valid prefix for
"c:\target" in canonicalized() is "c:" (NOT "c:\") and would
be treated like "c:\current\dir" again...and again...
until stack overflow :)
Merge-Request: 494
Task-number: QTBUG-7610
Reviewed-by: Zeno Albisser
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since ntfs symlinks (not .lnk files) can use
relative paths to targets, support for relative links
needed to be added.
Directory junctions can also be used to mount another
filesystem directly into an existing folder.
Such junctions in that case use the volume id of the
target volume for the link path. Therefor this commit
also includes an implementation for resolving volume ids.
To be independent of existing directories in test code
i added a function to create own junction points.
Reviewed-by: Joao
Task-number: QTBUG-9009, QTBUG-7036
|
|
|
|
|
|
|
|
|
|
| |
... according to the online MSDN documentation.
Hid the cachedFd member in private data under WinCE, since it's never
used there.
Task-number: QTBUG-9085
Reviewed-by: Zeno Albisser
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
configure.exe
examples/multimedia/audioinput/audioinput.cpp
src/corelib/io/qfsfileengine.cpp
src/gui/egl/qegl_wince.cpp
src/gui/egl/qeglproperties.cpp
src/gui/egl/qeglproperties_p.h
src/gui/embedded/directfb.pri
src/gui/kernel/qapplication_win.cpp
src/gui/painting/qdrawutil.cpp
src/opengl/qgl_p.h
src/sql/drivers/odbc/qsql_odbc.cpp
src/sql/drivers/odbc/qsql_odbc.h
tests/auto/auto.pro
tests/auto/qgl/tst_qgl.cpp
translations/assistant_adp_ru.ts
|
| |
| |
| |
| |
| | |
Task-number: QTBUG-8365
Reviewed-by: denis
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bin/syncqt
doc/src/deployment/deployment.qdoc
src/corelib/io/qfsfileengine_win.cpp
src/corelib/xml/qxmlstream.cpp
src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
tools/assistant/tools/assistant/centralwidget.cpp
tools/linguist/lupdate/main.cpp
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| | |
Reviewed-by: TrustMe
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use realpath(X,0) extension that is defined by the latest POSIX standard and
not many systems support it at the moment. For now we limit it to Linux and
Symbian. Mac supports it starting with 10.6, and we'll implement it properly
for Mac in 4.7. We know that neither *BSD systems nor Solaris do not support
it.
Reviewed-by: Markus Goetz
|
| |
| |
| |
| |
| |
| |
| | |
Using FSRef to get a canonical file path on OS X 10.5 which doesn't support
realpath(X,0) extension.
Reviewed-by: Prasanth
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As far as we know realpath(X,0) extenstion is only supported on Linux, Mac OS X
starting with 10.6 and on Symbian.
Here goes the trick: realpath() on Mac properly handles file systems
case-sensitivity, meaning two files with different cases will are the same file
if the file system is case insensitive (which is the default on Mac). However
the QFSFileEngine will still say that the file system is case sensitive because
on Mac you can have several drives with different file systems (with different
case sensitivity), and QFSFileEngine doesn't allow to return different values
depending on the file path, so we still say that the file system is
case-sensitive, which is the safiest behavior.
This changes the behavior on Mac, but changes it to be correct.
Reviewed-by: Markus Goetz
Reviewed-by: João Abecasis
|
|
|
|
|
|
| |
That was disabled by accident when we were disabling it for Mac.
Reviewed-by: Prasanth
|
|
|
|
|
|
|
| |
The realpath() extension we use in this function is only available from
10.6 onwards. For the time being this optimization is turned off on Mac.
Reviewed-by: Markus Goetz
|
|
|
|
|
|
|
|
|
|
| |
realpath() crashes on mac if the input file path is the root ("/") - on 10.6
calling a free on the returned value shows a warning saying the memory was not
allocated. To workaround that just added a special case - if the input string
is '/', we don't need to use realpath as we already know that the path is
canonical.
Reviewed-by: Prasanth
|
|
|
|
|
|
|
|
| |
The temporary object goes away before the next line is executed, so the
pointer to the const data is invalid. Just put it all on one line, and
we're ok.
Reviewed-by: Brad
|
|
|
|
|
|
|
|
| |
In our benchmark, this makes QFileInfo.canonical*Path() up
to 50% faster. This should also improve application startup time.
Let's see if it works on all Unices and Symbian.
Reviewed-by: mariusSO
|
|
|
|
|
|
|
|
|
|
|
| |
When writing nothing to a file, not actually writing anything is not an
error.
Also, from a change introduced in the same commit, there is no point in
checking for EOF when writing.
Task-number: QTBUG-5847
Reviewed-by: Olivier Goffart
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
configure.exe
src/corelib/io/qfsfileengine.cpp
tests/auto/qfile/tst_qfile.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was a serious performance issue on Symbian and not necessarily
optimal on other platforms. For the time being, we'll allow the OS to
read/write as much as it can.
Otherwise cleaned up the code, adding checks for invalid len arguments.
Task-number: QT-2347
Reviewed-by: Peter Hartmann
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Each read requires costly IPC call to Symbian file server, so reading
and writing large files has lot of unnecessary overhead when using 4k
block size. Increased the block size to 16k, which is what QIODevice
will request at maximum. This speeds up reading large files up to 10%.
Also included are some unnecessary whitespace removals.
Task-number: QT-2347
Reviewed-by: axis
|
| |
| |
| |
| |
| |
| |
| |
| | |
While POSIX specifies a -1 return on error, on Windows only non-zero is
documented for error conditions. All platforms agree that zero is
returned on success so we check for that instead.
Reviewed-by: Markus Goetz
|
| |
| |
| |
| | |
Reviewed-by: Thiago Macieira
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Creating a file mapping for each view mapped to memory is sub-optimal
and slow. With this change, a single mapping is created and reused when
mapping subsequent views of the file.
The handle returned from CreateFileForMapping (used in WinCE 5) is now
discarded, since the kernel manages it automatically with the file
mapping. This simplifies use of the deprecated map API.
Reviewed-by: Maurice Kalinowski
Reviewed-by: Marius Storm-Olsen
|
|\ |
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|