| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid using realpath(X,0) on Mac OSX at all, since
even on versions of OSX where realpath(X,0) is supported,
we still get the legacy version due to our compiler flags.
If we were to change the -mmacosx-version-min to 10.5 or
higher then this patch would be safe but unnecessary.
Task-number: QTBUG-28282
(cherry picked from commit 67195dc394001ee1c9adc7db97fd6ff9d88e9b0c)
Change-Id: I0e763321aed71b03e6bf256d112cf4b743411626
Signed-off-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Similar work was done in Qt5 in Change Id3b02316
Change-Id: I392d2a5bfffb9a335f28d5dbc5ea27b800fc4487
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some POSIX platforms do not support realpath(X, 0).
This commit is akin to the following qt5 commits:
4a4e9e4a9c56f9b27f2fb76fae6ff06b9f470895
ad5d64226abd50a43856ab560583f37b49ff04c9
6e8e1da0a8267d2f8f568403e6ab9fe53b01cd29
f3707a5a0c4483b15e7bb2ba9f0e7d1913a713ee
Change-Id: I05dc12cedefcaaa11eec2bcc71df023fdb51ac00
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently it depends on the user and/or firmware version on whether
TMPDIR or TEMP is set, so try both.
Additionally, fall back to /tmp if neither is set, as that seems to be
present on all devices.
This is a backport of a135d87a0f8ec24445e13fb54f4316e4ca7473be from
Qt5.
Change-Id: I1637f4ab74c8c8bd350b4efb451c2143c0642796
Reviewed-by: Sean Harmer <sean.harmer@kdab.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>
|
|
|
|
|
|
|
|
|
|
|
| |
Unlike Unix, Blackberry OS stores the location of the temporary directory into
the TEMP environment variable.
Change-Id: I31f50fc4b160e5594339c4fcd62613963cc1484f
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Adds check for Q_OS_QNX to force
QFileSystemEntry QFileSystemEngine::canonicalName() use realpath(X, 0) on QNX
as well.
cherry-picked from qt5/qtbase ee592fc042efc19acbc5407f5277abe7372c138d
Change-Id: I715b1a226cc89831333f70a295c5d269bf6a8baf
Reviewed-by: João Abecasis <joao.abecasis@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>
|
|
|
|
|
|
|
|
|
|
|
| |
First, #ifdef'ed out getpwuid_r() and getpwgid_r() usage since users/groups support is not in in single-process Posix mode.
Also, correct a typo and add missing files to io.pri.
Update documentation to disable libtiff which won't compile until ibtiff itself is updated, and add back -no-exceptions in the sample command line. And add a line to compile host tools.
Add a dummy QT_OPEN_LARGEFILE definition in qplatformdefs.h since there is code that requires it.
Move definition of getGlyph() after the definition of qHash(GlyphAndSubPixelPosition).
Merge-request: 2686
Reviewed-by: ossi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many applications relied on the undefined behaviour that the
filesystem engines returned clean paths (despite the documentation
stating that they may not), and consequently suffered regressions with
Qt 4.8.
Unix paths are once again cleaned if necessary.
Windows/Symbian paths were already cleaned, but now use the utility
function to check if a path is dirty, to avoid duplicated code.
Task-number: QTBUG-19995
Change-Id: If8c18469f149291c9d079ae3da23bc2087bbd49a
Reviewed-on: http://codereview.qt.nokia.com/4154
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
|
|
|
|
| |
Reviewed-by: Jørgen Lind
|
|
|
|
|
|
|
| |
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
| |
no-PATH_MAX case
... in the same way as done in the other code path.
This makes qmake/QtCore compile again on glibc systems without PATH_MAX (e.g. GNU/Hurd).
Merge-request: 1218
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
|
|
|
|
|
|
|
|
|
|
| |
In QString, it would comlain that:
assuming signed overflow does not occur when assuming that (X - c) > X is always false
Changing to unsigned comparison fix the warning
Others are about unused variables
Reviewed-by: Thiago
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
| |
Reviewed-by: Trust Me
(cherry picked from commit 774a3536b00c4d6e4c4c10b708e31b4373a338e3)
|
|
|
|
|
|
| |
Use the Function not implemented error
Reviewed-by: Joao
|
|
|
|
|
|
|
|
|
|
| |
Crashed on OpenBSD.
POSIX.1-2001 says that the behavior if resolved_path is NULL is
implementation-defined. POSIX.1-2008 specifies that the it can
be NULL
Reviewed-By: Markus Goetz
|
|
|
|
|
|
|
|
|
|
| |
This came as a requirement from a device manufacturer that couldn't
agree whether tmp is /var/tmp or /tmp, which lead to all kinds of side
effects. QSharedMemory token generation was broken depending on
where TMPDIR pointed to. This patch allows hard-coding a Qt-wide temp-dir
in qplatformdefs.
Reviewed-by: Robert Griebl
|
|
|
|
|
|
|
|
| |
The file-engine-refactor moved a lot of code around. So simple merge
conflict resolution didn't cut it to finish the merge.
Lighthouse on OS X adds Q_WS_QPA, where we were already using QWS. Also
introduced QT_NO_CORESERVICES.
|
|
|
|
|
|
| |
Symbian is not serviced by this code, anyway. So it's just dead code.
Reviewed-by: Shane Kearns
|
|
|
|
|
|
|
|
|
|
| |
resolveUser/GroupName(id) only make sense on Unix platforms, there's no
point in replicating them elsewhere.
bundleName is a Mac-only feature, so we can otherwise merge the default
implementation for other platforms.
Reviewed-by: Shane Kearns
|
|
|
|
|
|
|
|
|
|
| |
Testing done:
win32-msvc2008 and Mac OS X - qfile, qfileinfo, qdir, qdiriterator,
qtemporaryfile autotests
symbian-sbsv2 - qtcore, qtgui, qtxml autotests
win32-g++ - compilation test for qmake
Reviewed-By: Thomas Zander
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part of the refactoring broke error reporting (false would be return on
failure, but the QFile::error() would not return the right thing)
A string is passed to the QFileSystemEngine functions which need to return
an error, and filled in via the error code when a function fails.
For windows, this is GetLastError() as for the previous workaround
For unix, this is errno, as for the previous workaround
For symbian, this is the integer error code returned by the function
Reviewed-By: Thomas Zander
Reviewed-By: Prasanth Ullattil
|
|
|
|
|
|
| |
Resolve username and group names code is now in the QFileSystemEngine
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
| |
There is no native implementation for this (the old FSFilesystemEngine
never had one either) so no code to move.
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
|
| |
in the unix QFileSystemEngine::setPermissions we now update the
QFileSystemMetaData instance passed in on success, to avoid
another stat later.
Reviewed-by: João Abecasis
|
|
|
|
| |
Reviewed-by: João Abecasis
|
| |
|
|
|
|
|
|
|
| |
Moved these functions inside the QFilesystemEngine and redirected the
QFSFileEngine copies.
Reviewed-By: joao
|
| |
|
|
|
|
|
|
|
|
| |
On symbian, this allows us to use the cached ExistsAttribute
On symbian and unix, this allows us to update the caller's knowledge of
ExistsAttribute (potentially saving a stat later)
Reviewed-By: joao
|
|
|
|
| |
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having HiddenAttribute as part of PosixStatFlags, meant that we would
assume we knew about it whenever we stat'ed, which wasn't the intent. As
that is just one of the queries we do on Mac OS to determine if a file
is considered hidden.
Instead, we explicitly ask for a stat anytime the attribute is queried
for.
The proper fix will be to perform the cheap operations (e.g., file name
begins with '.') first and only stat if we still haven't got an answer.
|
|
|
|
|
|
|
|
|
| |
For unix port, set file times and size to 0, and owner/group id to
-2 (nobody) for files that don't exist.
Also implemented saving owner and group ids in fillFromStatBuf, which
was missing.
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are three possible sources for metadata:
RFs::Entry() - for files or directories in the filesystem (except roots)
RFs::Volume() - for mounted drives (used for root directory)
::fstat() - for Open C file handles adopted via QFile::open(int, OpenMode)
As a result of the ::fstat requirement, the code dealing with stat buffers
is moved from qfilesystemengine_unix.cpp to the common qfilesystemengine.cpp
Reviewed-By: joao
|
|
|
|
| |
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes to QFileSystemMetaData resulting from implementing
QFileSystemEngine::fillMetaData on Unix -- commit to follow.
* Added missing operators for MetaDataFlags
* Tentatively sharing entryFlags and size across platforms; times and
owner IDs are candidates
* Flags definition simplified and made stricter; unused bits are no
longer set in masks, either
* New AliasType for Mac; AliasType and BundleType on other platforms are
0 so they can be optimized out
* New SequentialType for files that are not regular files
* LocalDiskAttribute (LocalDiskFlag in QAbstractFileEngine) was only
used to flag the use of a native file engine, so it's useless here
* New flags for querying owner IDs
* New method: missingFlags, to help with incremental queries
* Added accessors for known data
* New method to fill metaData from struct stat
|
|
|
|
|
|
|
| |
migrate the QFSFileEngine::rmdir code to QFileSystemEngine::removeDirectory
and make the former call the latter.
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
| |
migrate the QFSFileEngine::mkdir code to QFileSystemEngine::createDirectory
and make the former call the latter.
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
| |
Move the code from the qfsfileengine_unix.cpp to the new place
and make the old place just call the new one.
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
|
| |
Renamed FileFlags to MetaDataFlags. Added barebones structure and enum
values to be shared across different implementations, with placeholders
for platform-specific #includes and data members.
Reviewed-by: Thomas Zander
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we are using a QString for the native file path on windows, the
constructors we had on other platforms didn't make sense: we can't have
two constructors taking a single QString parameter, and it would be
error prone to have the two argument constructor (taking two QString
parameters, on Windows) change the meaning of the first argument.
This patch introduces a typedef for the NativePath type being used; the
constructor taking the native path now requires a dummy parameter that
makes the intent expliciti; and the order of the arguments on the
constructor taking both native and Qt paths had the order switched.
Done-with: João Abecasis
|
|
|
|
|
|
|
| |
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
|