| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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 root path was intentionally changed to reflect the real
drive root, while home path continues to reflect the user
data directory.
Task-Number: QTBUG-21527
Reviewed-By: Miikka Heikkinen
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging:
Merge fixes for QDir::operator==
QSslCertificate: block all DigiNotar (intermediate and root) certs
Restore Qt4.7 behaviour of QFileInfo::absolute(File)Path
Fix compile error on MSVC2008
Fix comparison of absolute, unclean paths in QDir
Wrap calls to Sequence::push_back
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were two fixes in 4.8 which each fixed a part of the problem.
Comparing canonical paths is more correct, but is only possible where
both directories exist. If neither directory exists, then compare
absolute paths instead.
Changed a regression test, because /tmp is a symbolic link on MacOS.
I.E. "/tmp/.." is canonically "/private" and not "/" as expected.
Task-Number: QTBUG-20495
Reviewed-By: joao
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QDir::operator== was creating a clean absolute path for comparison
purposes if the original path was relative.
However original absolute paths were trusted, even though they could
be unclean. Now they are checked for cleanliness first.
Task-Number: QTBUG-19995
Task-Number: QTBUG-20495
Change-Id: I047a1a40ae5151e4604085e4ac87f30a4e4979c4
Reviewed-on: http://codereview.qt.nokia.com/4099
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
|
|\ \
| |/
| |
| |
| | |
Conflicts:
tools/qdoc3/cppcodemarker.cpp
|
| |
| |
| |
| |
| |
| | |
This reverts commit 07afddbf4bc029f776810381c7317fffa100eb60.
This breaks QDir autotests on windows.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This ensures there is a single definition of what constitutes an
absolute path in Qt.
Task-number: QTBUG-19995
Reviewed-by: Prasanth Ullattil
|
| |
| |
| |
| | |
Reviewed-by: Prasanth Ullattil
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can't rely on absolute paths when comparing directories for equality
as these don't take into account symbolic links and may also bypass ../
and ./ simplification.
Instead, canonical paths must be computed and can then be compared
according to the case sensitivity rules for the platform or file engine,
as is done in QFileInfo.
Task-number: QTBUG-20495
Reviewed-by: Prasanth Ullattil
|
|/
|
|
|
| |
Merge-request: 1299
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new code avoids non-const detaching operations until needed and uses
a pointer into the "raw" QChar data from then on, thus skipping unneeded
checks on the reference count for further detaching.
These functions are used all the time by the file system classes so this
small optimization won't hurt. In particular, it will help users who
already use '/' when passing paths into Qt.
Reviewed-by: Peter Hartmann
|
|
|
|
|
|
|
| |
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
|
| |
QFileSystemEntry doesn't know about paths as implemented by custom file
engines, such as is the case with resource files. In such cases, we need
to allow the engine to make the relative to absolute conversion.
Expanded QDir's test case to ensure resource paths are considered in
more places.
Task-number: QTBUG-17921
Reviewed-by: Prasanth Ullattil
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We used to call cleanPath on the result of absolutePath, before
returning it to the user, but stopped doing that. relativeFilePath
actually depended on that and broke.
Fixed now.
Reviewed-by: Prasanth Ullattil
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As much as I'd like to have the definition of "relative" be independent
of custom engines, the current architecture prevents us from doing that
without introducing knowledge about them in QFileSystemEntry. Fixing
this specifically for resource files would be possible, but let's not
break custom engines... just yet.
Reviewed-by: Prasanth Ullattil
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
In 4.7 and before a QDir::exists() always stats and a refresh() call would
flush metadata, restore this behavior again.
Reviewed-by: Prasanth Ullattil
|
| |
| |
| |
| | |
Reviewed-By: Thomas Zander
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
qmake/Makefile.win32
qmake/qmake.pri
src/corelib/io/qdir.cpp
src/corelib/io/qfileinfo.cpp
src/corelib/io/qfileinfo_p.h
src/corelib/io/qfsfileengine_win.cpp
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtCoreu.def
src/s60installs/eabi/QtGuiu.def
src/tools/bootstrap/bootstrap.pro
tests/auto/qfileinfo/tst_qfileinfo.cpp
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/corelib/kernel/qobject.h
src/declarative/graphicsitems/qdeclarativeflickable.cpp
src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
src/declarative/util/qdeclarativelistmodel.cpp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changing a relative path to a non-existing absolute path used to work,
this should work again after this patch.
Reviewed-by: João Abecasis
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
bin/syncqt
demos/declarative/snake/content/snake.js
demos/declarative/snake/snake.qml
doc/src/development/qmake-manual.qdoc
src/corelib/plugin/plugin.pri
src/gui/kernel/qapplication_win.cpp
src/gui/kernel/qdesktopwidget_win.cpp
src/gui/painting/qdrawhelper.cpp
tests/auto/qdir/tst_qdir.cpp
tools/qdoc3/test/assistant.qdocconf
tools/qdoc3/test/designer.qdocconf
tools/qdoc3/test/linguist.qdocconf
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Directly or indirectly, all instances of QDir call QDirPrivate::setPath,
which allocates a file engine and dereferences it. Any failures there
should already lead to a crash or a bad_alloc exception being thrown in
case of failure.
Given that, QDir may be (and was) broken when compiling Qt with
QT_NO_FSFILEENGINE, if no custom file engine and handler are provided.
This being the case, it's pointless to check fileEngine for null all
over the place. This simplifies the code and should allow for easier
transition to file-engine-less implementation.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For QFileInfo, the caching state was being lost on the different setFile
overloads. QDir::cd and ::makeAbsolute were losing filters and sorting
flags.
QDir issues were introduced with these patches:
"Simplify QDir::cd"
"QDir::makeAbsolute could self-destruct on failure"
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | | |
Must clear file lists when changing the name filters.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From the client API it is a broken concept, because it could leave the
user with an uninitialized file engine. Fixing to initialize the file
engine, would mean it is useless for internal use where file engines are
initialized separately.
In the end, removing both the QDir::detach introduced earlier and
throwing away the private d_func'tions altogether is a binary-compatible
change that should allow us to push this change in a patch release
(fingers crossed!)
Reviewed-by: Thiago Macieira
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Copy constructing a QDir instance from this and then detaching it in
setPath doesn't get us anything so we might as well do it all in one go.
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
makeAbsolute would return false if the newly constructed file engine
reported it wasn't referencing a directory. At this point, the private
data has already been updated, rendering the instance unusable.
Instead, we now create a separate QDir instance and reset our private
data only on success. Similarly to what's done in QDir::cd.
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the recent changes to QDirPrivate and how d_ptr is now a
QSharedDataPointer, we no longer need to worry about self-assignment, as
that is already handled by the d_ptr. Simplifying code here.
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While refactoring, a bug was introduced where shared data would be
updated before detaching in setNameFilter. Further refactoring turned
this into a double-detach, instead.
Now the issue is fixed by adding the appropriate initFileEngine and
nameFilters assignment, instead of calling setNameFilters to finish the
job.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some renaming to make intent clearer and improve consistency:
listsDirty => listsInitialized (logic inverted)
updateFileLists => initFileLists
clear => clearFileLists
Also note that initializing file lists shouldn't trigger detach, because
no previous version of the cached data has been seen.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | | |
Moved common initialization code from QDir ctor to QDirPrivate.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Merged QDirPrivate with QDirPrivate::Data, as QDirPrivate served no
purpose by itself, only adding an additional layer of indirection to the
potentially shared private data, and an unnecessary allocation.
Now, QDir holds a QSharedDataPointer to its private data. Private data
will be shared among copied instances with COW semantics. Still, this
sharing is very limited as plenty of regular use cases will cause the
shared data to detach, such as refreshing the file lists.
As the use QSharedDataPointer breaks usage of the Q_DECLARE_PRIVATE
macro, we manually define the d_func'tions. Non-const d_func detaches on
shared data. A detach function was added to the public interface to
support this. (On a side note, QFileInfo already exposes a similar
detach function).
As much as possible, detach is handled implicitly inside the Q_D macro,
through the d_func() non-const overload. On the other hand, implicit
creation of file engines through detach was made explicit with a call to
a new initFileEngine function.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was an unnecessary split of QDir's private data between
QDirPrivate and QDirPrivate::Data. As a stepping stone towards merging
the two, this moves everything into QDirPrivate::Data.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes extra baggage from our bootstapped tools, and also
ensures that we can compile it with host-g++ on Maemo which has a
problem parsing our deprecated macros inside templates.
Reviewed-by: Robert Griebl
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On changing path we always have to clear the metadata as thats from the
old directory and we need to re-stat for the new data.
Reviewed-by: João Abecasis
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make sure we share the pre-calculated entry and avoid resolving the
fileEngine if we know its a native FS based file.
Reviewed-by: João Abecasis
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Moved these functions inside the QFilesystemEngine and redirected the
QFSFileEngine copies.
Reviewed-By: joao
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QFileSystemEntry's m_filePath should always contain a path
with / as separator.
Reviewed-By: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The creation of a QAbstractFileEngine derived class will now
be avoided if the dir we are watching is on the native file system
and from then on all access will be through the direct API
Reviewed-by: João Abecasis
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Directly or indirectly, all instances of QDir call QDirPrivate::setPath,
which allocates a file engine and dereferences it. Any failures there
should already lead to a crash or a bad_alloc exception being thrown in
case of failure.
Given that, QDir may be (and was) broken when compiling Qt with
QT_NO_FSFILEENGINE, if no custom file engine and handler are provided.
This being the case, it's pointless to check fileEngine for null all
over the place. This simplifies the code and should allow for easier
transition to file-engine-less implementation.
Reviewed-by: Thomas Zander
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For QFileInfo, the caching state was being lost on the different setFile
overloads. QDir::cd and ::makeAbsolute were losing filters and sorting
flags.
QDir issues were introduced with these patches:
"Simplify QDir::cd"
"QDir::makeAbsolute could self-destruct on failure"
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | | |
Must clear file lists when changing the name filters.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From the client API it is a broken concept, because it could leave the
user with an uninitialized file engine. Fixing to initialize the file
engine, would mean it is useless for internal use where file engines are
initialized separately.
In the end, removing both the QDir::detach introduced earlier and
throwing away the private d_func'tions altogether is a binary-compatible
change that should allow us to push this change in a patch release
(fingers crossed!)
Reviewed-by: Thiago Macieira
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Copy constructing a QDir instance from this and then detaching it in
setPath doesn't get us anything so we might as well do it all in one go.
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
makeAbsolute would return false if the newly constructed file engine
reported it wasn't referencing a directory. At this point, the private
data has already been updated, rendering the instance unusable.
Instead, we now create a separate QDir instance and reset our private
data only on success. Similarly to what's done in QDir::cd.
Reviewed-by: Prasanth Ullattil
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the recent changes to QDirPrivate and how d_ptr is now a
QSharedDataPointer, we no longer need to worry about self-assignment, as
that is already handled by the d_ptr. Simplifying code here.
Reviewed-by: Prasanth Ullattil
|