summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Allow hard-coding the Unix temp pathHarald Fernengel2011-01-191-0/+4
| | | | | | | | | | 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
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-1773-73/+73
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Update copyright year to 2011.Jason McDonald2011-01-1075-75/+75
| | | | | | | | Reviewed-by: Trust Me
* | QProcessManager: minor optimizationRitt Konstantin2011-01-111-10/+6
| | | | | | | | | | | | | | | | | | QHash is slightly faster than QMap and should be preferred where the key order has no meaning; take() is faster than value() + remove() Reviewed-by: Olivier Goffart Merge-request: 1017
* | handle O_NONBLOCK'ed pipes specific error on write()Ritt Konstantin2011-01-112-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | according to the write(2) docs: When write requests greater than {PIPE_BUF} bytes to a pipe that has available space at least 1 byte, if O_NONBLOCK is set, write transfers what it can and returns the number of bytes written. When write requests of {PIPE_BUF} or less bytes to a pipe that has no enough space, or write requests for greater than {PIPE_BUF} bytes to a pipe that has no space, if O_NONBLOCK is set, write returns -1 and sets errno to EAGAIN. Merge-request: 997 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | move POSIX-specific debug to qprocess_unix.cppRitt Konstantin2011-01-112-3/+2
| | | | | | | | | | Merge-request: 997 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-01-081-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add /DYNAMICBASE /NXCOMPAT to linker options in Visual Studio 2005 and higher Fix compilation error on Solaris Check elapsed time only once
| * | Fix compilation error on SolarisJoão Abecasis2011-01-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d_type in dirent is a non-standard extension to POSIX available on some platforms (namely BSDs, Mac, Linux, Symbian). Taking the conservative approach and using this information only on platforms known to support it. Reviewed-by: Shane Kearns
* | | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-071-0/+1
|\ \ \ | |/ / |/| / | |/
| * QUrl::setUrl should call detachOlivier Goffart2011-01-061-0/+1
| | | | | | | | | | | | Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz
* | Merge branch 'earth/file-engine-refactor' of ↵Qt Continuous Integration System2010-12-246-12/+277
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix qfile test crash with glibc Fix qfile test errors Update def files Add autotests for AutoCloseHandle / DontCloseHandle and RFile adoption QFile API: add API to specify if adopted file handles should be closed
| * \ Merge branch 'earth/file-engine-refactor' of ↵Qt Continuous Integration System2010-12-236-12/+277
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix qfile test crash with glibc Fix qfile test errors Update def files Add autotests for AutoCloseHandle / DontCloseHandle and RFile adoption QFile API: add API to specify if adopted file handles should be closed
| | * | QFile API: add API to specify if adopted file handles should be closedShane Kearns2010-12-206-12/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFile behaviour has been to not close file handles adopted by open(FILE*, OpenMode) and open(int fd, OpenMode) functions. This is inconvenient for frameworks which want to return an opened QFile to the user. In this case it would be better to transfer ownership of the handle to the QFile. New overloads are added which take an additional parameter from the QFile::FileHandleFlags flags. Currently only one bit is used to provide the AutoCloseHandle option, but it is extensible. The AutoCloseHandle option tells the QFile backend that it should close the handle when close() is called, rather than the default behaviour which remains to flush the handle and leave it open. The DontCloseHandle option is the inverse of this, specifying the old behaviour of flushing but not closing the file handle. Symbian OS file handles are not compatible with int, they are an opaque data type which contains two integers. The first identifies to the kernel the file server session The second identifies to the file server the subsession object (the file) The reason for this is that it has a microkernel architecture, the kernel has no support for files - all files and file systems are handled by a user mode process called the "file server". So for symbian, a new QFile::open() overload is added for adopting a symbian RFile handle. The API mirrors the existing API for POSIX file handles, but takes an RFile reference rather than an integer file descriptor. Task-number: QT-2924 Reviewed-by: joao Reviewed-by: mread Reviewed-by: Oswald Buddenhagen
* | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-12-245-43/+100
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (39 commits) Whitespace change Fix for coding conventions. Fix resource leak in QCLuceneStandardAnalyzer::QCLuceneStandardAnalyzer. Fix resource leak in QCLuceneStopAnalyzer::QCLuceneStopAnalyzer. Assistant: Get rid of bogus warning. add missing license header Add inter-process binary shader cache for MeeGo Track average wait times under our maximum spin time threshold Store and track spin times in nanosecond resolution Optimize adaptive spinning mutex code Improve QMutex contention performance on Linux Improve QMutex contention performance on Mac OS X Disable spinning under lock contention on single CPU machines Remove unnecessary testAndSetAcquire from QMutex::lockInternal() Move contender count maintenance to QMutexPrivate test contention when using 2 mutexes Ensure that every thread does contend in the contention tests Add baseline test data to measure test overhead Test contention performance for long (10ms) critical sections Add a benchmark for contended and uncontended QMutex performance ...
| * | | Delay creation of the process managerHarald Fernengel2010-12-201-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The *nix process manager would create a pipe on every startup. In order to improve startup speed, the QProcessManager is now created when first needed. Reviewed-by: Robert Griebl
| * | | document WriteFailed status codes (whoops)Oswald Buddenhagen2010-12-172-0/+2
| | | |
| * | | add write error handling to QTextStreamOswald Buddenhagen2010-12-162-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add new status flag WriteFailed. use it in flushWriteBuffer(). remove the boolean return values from write(), putString() and putNumber(), as they were ignored anyway - flushWriteBuffer() does it correctly now. Task-number: QTBUG-376 Reviewed-by: mariusSO
| * | | add write error handling to QDataStreamOswald Buddenhagen2010-12-162-20/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add new status flag WriteFailed. use it in all write functions. Task-number: QTBUG-376 Reviewed-by: mariusSO
| * | | don't report flush error when we didn't flush in the first placeOswald Buddenhagen2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | this went unnoticed, as the return value is ignored - so far. Reviewed-by: mariusSO
| * | | clarify setStatus() behaviorOswald Buddenhagen2010-12-162-0/+6
| |/ / | | | | | | | | | Reviewed-by: mariusSO
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-232-7/+1
|\ \ \ | |/ / |/| / | |/ | | | | Conflicts: src/s60main/newallocator_hook.cpp tools/runonphone/serenum_unix.cpp
| * Doc: Fixed a link to the correct searchPaths() function.David Boddie2010-12-071-1/+1
| |
| * Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-272-107/+97
| |\
| * \ Merge branch '4.7-upstream' into 4.7-docA-Team2010-11-261-0/+1
| |\ \
| * | | Doc: Removed two warnings from QDirIterator docsGeir Vattekar2010-11-261-6/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-15492
* | | | Merge branch 'earth/file-engine-refactor' of ↵Qt Continuous Integration System2010-12-1432-2761/+5586
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (224 commits) Fix warnings, whitespace cleanup Don't rely on uninitialized data Doc: Fixing typo Doc: Fixing typo Skip failing tests Use effective user id instead of getlogin 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 ...
| * | | | Fix warnings, whitespace cleanupJoão Abecasis2010-12-142-1/+5
| | | | | | | | | | | | | | | | | | | | ... and trigger CI :-/
| * | | | Don't rely on uninitialized dataJoão Abecasis2010-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we fail to get file attributes, the file times are left in an uninitialized state, which may lead to a crash. In particular, this was showing up in QMessageBox's autotest, where the lastModified time is being queried on a non-existing file. Before the refactoring, we were returning a default constructed QDateTime to queries about different file times, with this change we will return the time corresponding to a default constructed FILETIME object. Reviewed-by: Shane Kearns
| * | | | 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
| | | | |
| * | | | Merge remote branch 'origin/master' into file-engine-refactorJoão Abecasis2010-12-025-118/+106
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | 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
| * | | | | 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-2312-31/+67
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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