summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'earth/file-engine-refactor' of ↵Qt Continuous Integration System2010-12-0846-2831/+6044
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-file-engines-refactor into master-integration * 'earth/file-engine-refactor' of scm.dev.nokia.troll.no:qt/qt-file-engines-refactor: (218 commits) Fix compile error in tst_qfileinfo on Mac/Linux Fix tst_QFileInfo owner() & group() failure on Windows. Fix tst_QFileInfo::canonicalFilePath failure on Windows Fix QDir::relativeFilePath Fix spelling in comments Add missing license header to test case Define _WIN32_WINNT before any includes New attempt at fixing compilation failure Removing unused duplicate definitions No symbolic links in Windows CE Set minimum target Windows version to 2000 More missing includes Add missing include Fix compile error Update def files Fix tst_QFile::caseSensitivity test on Mac Fix typo in QFile test Add test generated files to .gitignore Fix compile error for qdir autotest on symbian3 QtDeclarative: make autotests compile on symbian ...
| * Merge branch 'earth/file-engine-refactor' of ↵Qt Continuous Integration System2010-12-0746-2831/+6044
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-file-engines-refactor into master-integration * 'earth/file-engine-refactor' of scm.dev.nokia.troll.no:qt/qt-file-engines-refactor: (218 commits) Fix compile error in tst_qfileinfo on Mac/Linux Fix tst_QFileInfo owner() & group() failure on Windows. Fix tst_QFileInfo::canonicalFilePath failure on Windows Fix QDir::relativeFilePath Fix spelling in comments Add missing license header to test case Define _WIN32_WINNT before any includes New attempt at fixing compilation failure Removing unused duplicate definitions No symbolic links in Windows CE Set minimum target Windows version to 2000 More missing includes Add missing include Fix compile error Update def files Fix tst_QFile::caseSensitivity test on Mac Fix typo in QFile test Add test generated files to .gitignore Fix compile error for qdir autotest on symbian3 QtDeclarative: make autotests compile on symbian ...
| | * Fix QDir::relativeFilePathJoão Abecasis2010-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Fix spelling in commentsJoão Abecasis2010-12-052-2/+2
| | |
| | * Define _WIN32_WINNT before any includesJoão Abecasis2010-12-051-4/+4
| | | | | | | | | | | | ... to ensure it's properly defined before <windows.h> is ever included.
| | * New attempt at fixing compilation failureJoão Abecasis2010-12-052-6/+4
| | | | | | | | | | | | | | | | | | | | | Including windows.h and defining _WIN32_WINNT didn't cut it. Instead, fall back to explicitly #defining IO_REPARSE_TAG_SYMLINK in metadata header, since it's all that's needed there. In windows-specific iterator implementation ensure _WIN32_WINNT >= 0x0500.
| | * Removing unused duplicate definitionsJoão Abecasis2010-12-051-27/+0
| | | | | | | | | | | | | | | These functions have been forked in qfilesystemengine_win.cpp and are no longer used in this file. Cleaning up.
| | * No symbolic links in Windows CEJoão Abecasis2010-12-041-0/+2
| | |
| | * Set minimum target Windows version to 2000João Abecasis2010-12-042-0/+8
| | | | | | | | | | | | Required for FindFirstFileEx.
| | * More missing includesJoão Abecasis2010-12-042-0/+3
| | |
| | * Add missing includeJoão Abecasis2010-12-041-0/+1
| | |
| | * Fix compile errorShane Kearns2010-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | Missing QT_BEGIN_NAMESPACE caused error when the namespace macros are defined. Reviewed-by: mread
| | * Update def filesShane Kearns2010-12-024-3/+12
| | | | | | | | | | | | | | | | | | refreeze on top of master def files (we have added some exports to QtCore) Reviewed-by: Trust Me
| | * Merge remote branch 'origin/master' into file-engine-refactorJoão Abecasis2010-12-02132-1193/+2010
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master's version of conflicting def files picked. Conflicts: src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def
| | * | QtDeclarative: make autotests compile on symbianShane Kearns2010-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move tests for private classes inside private_tests scope Add missing libraries Add QT_NO_CONCURRENT ifdef around a test case Define Q_DECLARATIVE_PRIVATE_EXPORT as Q_AUTOTEST_EXPORT, so the classes are exported for autotests, previously they were exported on every OS except symbian. (this doesn't affect exports for production builds) Reviewed-by: Miikka Heikkinen
| | * | Fix buffered/unbuffered mode issues on symbianShane Kearns2010-11-302-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a bug in the symbian file server, files in /resource can't be opened for unbuffered read, only for default mode read. (it doesn't mask the cache control flags when doing the security check) So read will always be done in default mode. Symptom of this was that QML plugin loading failed as the plugin description in /resource could not be read. Buffered or unbuffered writes (i.e. whether the cache should be write through or write behind) are controlled by the QIODevice::Unbuffered flag, therefore it needs to be passed through to the file engine. An optimisation for unix and windows to force unbuffered mode in the file engine is inappropriate (as that is referring to buffering in the standard library, which is bypassed entirely by using the low level RFile to open files on symbian) Reviewed-by: joao
| | * | Update with def files merged from masterShane Kearns2010-11-305-7/+468
| | | | | | | | | | | | | | | | | | | | | | | | This set of def files is good to merge back, if the merge is done soon. Reviewed-by: Trust Me
| | * | Fix compile error on symbianShane Kearns2010-11-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbian doesn't have file owners, the resolveUserName / resolveGroupName functions have been correctly moved to unix only scope which caused a compile error. This change makes the QFSFileEngine::owner[Id] return -2 / QString() for symbian directly. Reviewed-by: Markus Goetz
| | * | Let's use engine's understanding of relative pathJoão Abecasis2010-11-252-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | Fix compile error on WindowsPrasanth Ullattil2010-11-241-0/+4
| | | | | | | | | | | | | | | | Reviewed-by: Joao
| | * | Adding #ifdefs/#defines lost in the merge to masterJoão Abecasis2010-11-235-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | Merge remote branch 'qt/master' into file-engine-refactorJoão Abecasis2010-11-23808-7476/+41953
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/corelib/io/io.pri src/corelib/io/qfsfileengine.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtDeclarativeu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtDeclarativeu.def src/s60installs/eabi/QtGuiu.def tests/auto/qapplication/test/test.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qdiriterator/qdiriterator.pro tests/auto/qsound/qsound.pro
| | * | | QFileSystemEngine: remove symbian code from Unix-specific implementationJoão Abecasis2010-11-221-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbian is not serviced by this code, anyway. So it's just dead code. Reviewed-by: Shane Kearns
| | * | | QFileSystemEngine: clean up unused codeJoão Abecasis2010-11-224-45/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Windows: fix QFile::symLinkTargetShane Kearns2010-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing return statement Reviewed-by: joao
| | * | | Fix QFile::resize on windows for files opened from a FILE*Shane Kearns2010-11-161-3/+7
| | | | | | | | | | | | | | | | | | | | Reviewed-By: joao
| | * | | QFile: Fix compilationJoão Abecasis2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EACCES was not defined at this point, but it is also not needed, since we know exactly why unmap is failing. Reviewed-by: Shane Kearns
| | * | | QFileSystemEngine::resolveUserName and not groupJoão Abecasis2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Shane Kearns
| | * | | Re-enable emulated QFile::map on symbianShane Kearns2010-10-294-26/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Add support for QFileInfo owner() & group() on WindowsPrasanth Ullattil2010-10-271-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since windows doesn't have the concept of user and group IDs, the name resolution has to be done differently. If the qt_ntfs_permission_lookup flag is set (default = 0), the user information is retrieved through the NTFS object security information. Reviewed-by: Joao
| | * | | Fix QFileDialog regression in symbianShane Kearns2010-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbian now follows the same convention as windows, where "c:" means the working directory on the C: drive. As a result, the path "c:/" needs to be passed to QFileInfoGatherer when getting info for the root directory. This code already existed but only enabled for windows - now enabled for symbian as well. Reviewed-By: Markus Goetz
| | * | | Move QDir::fromNativeSeparators call to the QFileSystemEntry constructorShane Kearns2010-10-207-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Implement seek beyond end of file for symbianShane Kearns2010-10-191-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Symbian, the Seek() function clamps to the end of file position if a position beyond the end of file is given. Also the write functions which take a position silently append at the end of file position if asked to write to a start position beyond EOF. To avoid this behaviour, we don't use seek but rather maintain our own cursor position. When writing, we check if the cursor is beyond EOF and if so extend the file using SetSize() before writing. Reviewed-By: joao
| | * | | Document behaviour of QFile::seek when seeking beyond EOFShane Kearns2010-10-191-1/+11
| | | | | | | | | | | | | | | | | | | | Reviewed-By: joao
| | * | | Fix QFileInfo("").exists() regression for symbianShane Kearns2010-10-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because RFs::Entry("") gets the entry for the current directory, we need to explicitly check for empty strings and treat as a non existant file. Reviewed-By: joao
| | * | | Fix crash in QApplication auto testShane Kearns2010-10-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer is lazily initialised by QWidget, but becomes invalid after the application is destroyed. In the QApplication autotest, QApplication is created and destroyed many times in the same thread (while in normal use it is created at startup and destroyed on exit) As a result, the pointer which is stored in global data became stale and caused a crash due to calling functions on a deleted object. Reviewed-By: Jason Barron
| | * | | Fix for qfileinfo isExecutable test case.Shane Kearns2010-10-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Files in /sys/bin/ on any drive can be assumed to be executable. So the executable flag is set in the metadata for this path, even though RFs::Entry fails due to permissions (so we don't know if the file exists or not) Reviewed-By: joao
| | * | | Fix for QFile::copy failing silently with relative pathsShane Kearns2010-10-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CFileMan doesn't support . and .. in relative paths. Therefore, paths are converted to absolute first. Also, the error was being ignored which has been fixed. Reviewed-By: joao
| | * | | Fix caching of metadata in QDir to not change behaviorThomas Zander2010-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Fix return value for QDir::mkdir on symbianShane Kearns2010-10-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 4.7 behaviour was to return false when directory already exists for mkdir but true when directory already exists for mkpath. This change makes symbian do that in master, even though it's inconsistent. Reviewed-By: Thomas Zander
| | * | | Update documentation of QDir to reflect Qt 4 behaviourShane Kearns2010-10-121-0/+6
| | | | | | | | | | | | | | | | | | | | Reviewed-By: Thomas Zander
| | * | | Use QSystemError to return errors from QFileSystemEngineShane Kearns2010-10-129-138/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Update DEF filesShane Kearns2010-10-087-22/+353
| | | | | | | | | | | | | | | | | | | | Reviewed-By: Trust Me
| | * | | Merge remote branch 'qt/master' into earth/file-engine-refactorShane Kearns2010-10-0888-559/+1824
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| | * | | | Create QSystemError classShane Kearns2010-10-083-58/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is for holding errors returned from system calls, which can be later converted to a string when a string is needed. This will eventually replace the setError(int,string) used in file engines so that strings are only created on demand. The scope of an error is used to distinguish error codes from the C standard library vs error codes from native calls. On some OS (e.g.windows) these error ranges overlap. Reviewed-By: joao
| | * | | | Fix compileThomas Zander2010-10-071-1/+1
| | | | | |
| | * | | | Merge commit 'origin/master' into fileEnginesThomas Zander2010-10-078-137/+265
| | |\ \ \ \
| | * | | | | Remove setSymbianError functionShane Kearns2010-10-071-37/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt autotests require the same error code on all platforms, and the OS specific error to be in text format in the errorString. Tests were failing due to QFile::error returning more detailed information than was wanted. Reviewed-By: Thomas Zander
| | * | | | | Fix tst_qtemporaryfile failures on symbianShane Kearns2010-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path created by the _gettemp function is not a native path, as it contains the wrong slashes. So convert it back to a QString first. Check for symbian file handle in the isReallyOpen function so that reopening temp files works correctly. Reviewed-By: Thomas Zander
| | * | | | | Implement error reporting for QFile position and size functionsShane Kearns2010-10-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-By: Thomas Zander