diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-08-25 11:38:32 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-09-07 12:17:00 (GMT) |
commit | eddb2264a5f12ea0e6a593ca411fb6be4b8f926d (patch) | |
tree | c1b861f711876700588fe6b6d7b689469b9c0b70 /mkspecs/macx-pbuilder | |
parent | f3c3b63764f50151f373ff280bd4b77093b371db (diff) | |
download | Qt-eddb2264a5f12ea0e6a593ca411fb6be4b8f926d.zip Qt-eddb2264a5f12ea0e6a593ca411fb6be4b8f926d.tar.gz Qt-eddb2264a5f12ea0e6a593ca411fb6be4b8f926d.tar.bz2 |
Removed QDirPrivate layer of indirection
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
Diffstat (limited to 'mkspecs/macx-pbuilder')
0 files changed, 0 insertions, 0 deletions