summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move canonicalPath() to the new qfilesystemengine_unixThomas Zander2010-08-3013-72/+162
| | | | Reviewed-by: João Abecasis
* Fix the tst_QFileInfo::absolutePath() autotests on WindowsPrasanth Ullattil2010-08-301-2/+4
| | | | Reviewed-by: Joao
* QFileSystemEngine::isCaseSensitive for Symbian and WindowsJoão Abecasis2010-08-302-1/+5
|
* Removed native file path handling from QFSFileEngineJoão Abecasis2010-08-307-318/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Small changes to QFileSystemEntryJoão Abecasis2010-08-302-5/+13
| | | | | | | | | | * Added default constructor. * Made single-argument constructors explicit * Converted bit-field data to "proper" variables - the bit-fields may have been premature optimization and it may even turn out to not relevant to keep this cache. Reviewed-by: Thomas Zander
* Added missing QT_BEGIN/END_NAMESPACEJoão Abecasis2010-08-304-1/+18
| | | | to implementation files in new QFileSystem* API.
* Adding QFileSystemEntry and QFileSystemEngine to build systemJoão Abecasis2010-08-309-9/+51
| | | | | | | | Since we're refactoring code out of QFSFileEngine the new internal classes have to be compiled in together with the old engines. For the time being, we'll assume Mac uses the unix version of the engine. We'll fork those only if and as needed.
* Simplify QDir::cdJoão Abecasis2010-08-271-2/+1
| | | | | | | 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
* QDir::makeAbsolute could self-destruct on failureJoão Abecasis2010-08-271-7/+4
| | | | | | | | | | | 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
* QDir::operator= simplificationJoão Abecasis2010-08-271-3/+0
| | | | | | | | 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
* Move absoluteName to new fileSystemEngine for unixThomas Zander2010-08-272-15/+34
| | | | | | | | | | Move the code for determining the absolute path on unix from the qfsfileengine_unix.cpp to the new qfilesystemengine_unix.cpp which is a static, stateless class. Made sure that the old qfsfileengine_unix.cpp keeps on working by calling into the new one. Reviewed-by: João Abecasis
* Add empty implementations of each of the filesystemenginesThomas Zander2010-08-264-0/+361
|
* Begin defining the interface for file engines NGJoão Abecasis2010-08-262-0/+33
| | | | | | | | | | New file engine API is meant to be a thin layer of abstraction over native file system APIs. Stateless and static for the time being. Platform-specific implementations will follow. Reviewed-by: Thomas Zander Reviewed-by: Prasanth Ullattil
* QDirPrivate refactoringJoão Abecasis2010-08-251-1/+3
| | | | | | | | | | | | 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
* QDirPrivate refactoringJoão Abecasis2010-08-251-20/+20
| | | | | | | | | | | | | 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
* QDirPrivate refactoringJoão Abecasis2010-08-251-25/+24
| | | | | | Moved common initialization code from QDir ctor to QDirPrivate. Reviewed-by: Thomas Zander
* Removed QDirPrivate layer of indirectionJoão Abecasis2010-08-252-229/+216
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor QFileInfoPrivate::Data (Round 2)Prasanth Ullattil2010-08-254-186/+170
| | | | | | | The QFileInfoPrivate::Data member class is removed now. All the methods moved to QFileInfoPrivate. QFileInfoPrivate becomes a QSharedData type. Reviewed-by: Joao
* Fix QFileSystemEntry autotests for WindowsPrasanth Ullattil2010-08-252-4/+4
| | | | Reviewed-by: Thomas Zander
* Fix the unit test on WindowsThomas Zander2010-08-251-1/+8
|
* Add unit test for qfilesystementryThomas Zander2010-08-255-4/+172
| | | | Reviewed-by: Joao
* Refactoring QDirPrivate::DataJoão Abecasis2010-08-241-84/+98
| | | | | | | | 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
* Move QFileInfoPrivate methods to QFileInfoPrivate::Data (1st Round)Prasanth Ullattil2010-08-242-89/+90
| | | | Reviewed-by: Joao
* Add some more methods to the QFileSystemEntryThomas Zander2010-08-242-8/+94
|
* Add constructors and basic getters to QFilesystemEntryThomas Zander2010-08-242-0/+91
| | | | Reviewed-by: Prasanth Ullattil
* Adding internal classes QFileSystem{Engine,MetaData}João Abecasis2010-08-243-1/+131
| | | | | | Empty for now. Reviewed-by: Thomas Zander
* Adding placeholder for internal QFileSystemEntry classJoão Abecasis2010-08-243-2/+109
| | | | Reviewed-by: Thomas Zander
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-198-23/+52
|\ | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Make the QItemSelectionRange and QItemSelectionModel ensure that the model is correct. Fixed autotest compilation issue on solaris Fixed build issue on Solaris
| * Make the QItemSelectionRange and QItemSelectionModel ensure that the model ↵Stephen Kelly2010-08-192-1/+30
| | | | | | | | | | | | | | is correct. Merge-request: 720 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
| * Fixed autotest compilation issue on solarisThierry Bastian2010-08-195-19/+19
| | | | | | | | Task-number: QTBUG-12991
| * Fixed build issue on SolarisThierry Bastian2010-08-191-3/+3
|/ | | | Task-number: QTBUG-12994
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-191-0/+7
|\ | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QGroupBox: Fix the focus rect of the title when using stylesheet
| * QGroupBox: Fix the focus rect of the title when using stylesheetMartin Pejcoch2010-08-191-0/+7
| | | | | | | | | | Task-number: QTBUG-13015 Reviewed-by: Olivier Goffart
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-1915-46/+60
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: qUncompress: don't exit on allocation failure with -no-exceptions Prefer Q_CHECK_PTR to q_check_ptr Prefer Q_CHECK_PTR to q_check_ptr Ensure Q_CHECK_PTR always requires terminating ; Q_CHECK_PTR should issue qFatal with QT_NO_EXCEPTIONS Workaround what seems to be a compiler parser bug
| * | qUncompress: don't exit on allocation failure with -no-exceptionsJoão Abecasis2010-08-192-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're not allowed to fail here with -no-exceptions, we shouldn't throw either so just check the return value from qRealloc and be done with it. Also changed the test case so it doesn't expect bad_alloc being thrown; the test data now gets properly initialized... Reviewed-by: Olivier Goffart Reviewed-by: Harald Fernengel
| * | Prefer Q_CHECK_PTR to q_check_ptrJoão Abecasis2010-08-1910-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the macro version we get proper debug output (with __FILE__, __LINE__ annotations) when compiling with -no-exceptions and !QT_NO_DEBUG. All changes in this patch affect assignment to local variables, where the order of assignment versus actual pointer check is not important. Reviewed-by: Olivier Goffart
| * | Prefer Q_CHECK_PTR to q_check_ptrJoão Abecasis2010-08-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | With the macro version we get proper debug output (with __FILE__, __LINE__ annotations) when compiling with -no-exceptions and !QT_NO_DEBUG. Reviewed-by: Olivier Goffart
| * | Ensure Q_CHECK_PTR always requires terminating ;João Abecasis2010-08-191-1/+1
| | | | | | | | | | | | | | | | | | ... even with -no-exceptions and QT_NO_DEBUG. Reviewed-by: Olivier Goffart
| * | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-192-2/+2
| |\ \ |/ / / | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Q_CHECK_PTR should issue qFatal with QT_NO_EXCEPTIONS Workaround what seems to be a compiler parser bug
| * | Q_CHECK_PTR should issue qFatal with QT_NO_EXCEPTIONSJoão Abecasis2010-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allowing the null pointer to propagate seems to be a bigger evil and could potentially become a security risk. Task-number: QT-3785 Reviewed-by: Peter Hartmann Reviewed-by: Olivier Goffart Reviewed-by: Thiago Macieira
| * | Workaround what seems to be a compiler parser bugJoão Abecasis2010-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The workaround seems harmless, otherwise. Maybe even standard-compliant (14.2.4 [temp.names]) $ gcc --version sbox-arm-none-linux-gnueabi-gcc (cs2009q1-eglibc2.8-armv7) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc. Reviewed-by: Olivier Goffart
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-1913-76/+80
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Disable translatedRotatedAndScaledPainter testcase as it is broken. Fixed partial update on QLineEdit disable the outlinefillconsistency test until the line algorithm has been updated. Fix nasty copy-paste bug in fetchTransformedBilinear() fix breakages in qpainter autotests. QMetaType: add "signed char" as builtin. Fix how subpixel positions are intepreted in an aliased grid.
| * | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2Gunnar Sletta2010-08-193-8/+19
| |\ \
| | * | Fixed partial update on QLineEditThierry Bastian2010-08-183-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLineControl passes a QRect to tell when a partial update is needed. We used to connect this slot to update. This made the whole lineedit update when the cursor blinked. Task-number: QTBUG-12709 Reviewed-by: gabi
| * | | Disable translatedRotatedAndScaledPainter testcase as it is broken.Gunnar Sletta2010-08-191-1/+20
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the order of rounding to fixedpoint is different in the static and normal text case and this leads to some glyphs occationally being 1 pixel off. In the normal case, the glyphs are laid out and positioned in fixed point, then transformed using the full current matrix including the position which is then snapped to integer device space when drawn. In the static text case, the glyphs are laid out and positioned in fixed point related to 0,0. The actual device position is then added to the glyph positions.
| * | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2Gunnar Sletta2010-08-186-29/+180
| |\ \
| | * | Fix nasty copy-paste bug in fetchTransformedBilinear()Paul Olav Tvete2010-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Introduced in commit 0d7e68391 Reviewed-by: Samuel
| | * | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-178-65/+36
| | |\ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: fix breakages in qpainter autotests. QMetaType: add "signed char" as builtin. Fix how subpixel positions are intepreted in an aliased grid.
* | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-175-27/+178
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Designer: Add 'Simplify rich text' filter to rich text editor.
| * | | Designer: Add 'Simplify rich text' filter to rich text editor.Friedemann Kleint2010-08-175-27/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an option to filter out style elements created by the text engine to keep the rich text simple. Acked-by: Jarek Kobus <jaroslaw.kobus@nokia.com> Task-number: QTBUG-10890