summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* networking: regenerate effective TLD table for cookiesPeter Hartmann2011-11-102-6158/+6730
| | | | Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QIODevice - disallow setTextMode when not openShane Kearns2011-10-271-0/+6
| | | | | | | | | | | | Calling setTextMode() before open() would make the device appear to be already open and cause later errors. Added a qWarning and documentation update to prevent this API misuse Task-number: QTBUG-20905 Change-Id: I2e06cd8e79f4afcf27417ac0eae6ebef980a17aa Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> (cherry picked from commit 29c30a20bab4c4ea892b95c08c71bb5f136bb82c)
* Merge remote-tracking branch 'qt/4.8'Sami Lempinen2011-10-142-2/+1
|\
| * Build fix for WINCE to qfilesystemengine_win.cppjaanttil2011-10-051-1/+0
| | | | | | | | | | Merge-request: 2662 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * Merge remote-tracking branch 'mainline/4.8'Oswald Buddenhagen2011-09-282-1/+51
| |\
| | * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into ↵Qt Continuous Integration System2011-09-202-1/+51
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: (31 commits) runonphone: Include USB serial ports on OS X for CODA, too runonphone: Implement traceswitch support for coda Fix missing clean up stack panic for a new thread in Symbian Regression in QS60Style when drawing webview scrollbars Cleanup qwidget_s60.cpp Fix panic when global QSettings instance needs flusing at app exit Fix uninitialised variable in temporary files More accurately determine bearer type for symbian GPRS/3G Add documentation for Symbian QSettings locations and security Update QDesktopServices openUrl() documentation on Symbian OS Mark binaries as SMPSAFE in Symbian Fix "sbs -c tools2 --what" output for Qt. Update environment.prf QS60Style: Make spinboxes and lineedits slightly taller runonphone: Add a missing space between a message and the file name runonphone: Allow overriding the temporary sis file name Fix QIcon auto-tests for Symbian Add a cast to moc cpp generator to remove armcc warnings Fix qt.conf for Symbian to use $${EPOCROOT} Remove few unused variables. ...
| * | | docs: Typo and link fixes.jaanttil2011-09-271-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-9224 Task-number: QTBUG-13442 Task-number: QTBUG-19858 Task-number: QTBUG-20957 Task-number: QTBUG-21447 Merge-request: 1402 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | Fix incorrect QFileInfo permissions on windowsShane Kearns2011-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Requesting the write permission marked the read permission as known without having retrieved it. A subsequent request for read permission would return false. Task-Number: QTBUG-20714 Reviewed-By: mread
* | | symbian - document behaviour of QFile::handle()Shane Kearns2011-09-281-0/+7
| | |
* | | Making QNotifyChangeEvent, Symbian file watcher, more widely usablemread2011-09-282-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNotifyChangeEvent was being used by QSymbianFileSystemWatcherEngine, but it also helps in the implementation of new plugin watching for QTBUG-20098. So it has been generalised to work with an interface and any class that implements that interface. The Qt file system watchers could not be used in QTBUG-20098, as they will not watch for currently non-existing directories. Task-number: QTBUG-20098 Reviewed-by: Shane Kearns
* | | symbian - Document behaviour of QDir::rootPath / homePathShane Kearns2011-09-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge remote-tracking branch 'qt/4.8'Sami Lempinen2011-09-208-23/+60
|\ \ \ | |/ / | | / | |/ |/|
| * Resolve a number of compilation issues with INTEGRITYRolland Dudemaine2011-09-192-1/+7
| | | | | | | | | | | | | | | | | | | | | | First, #ifdef'ed out getpwuid_r() and getpwgid_r() usage since users/groups support is not in in single-process Posix mode. Also, correct a typo and add missing files to io.pri. Update documentation to disable libtiff which won't compile until ibtiff itself is updated, and add back -no-exceptions in the sample command line. And add a line to compile host tools. Add a dummy QT_OPEN_LARGEFILE definition in qplatformdefs.h since there is code that requires it. Move definition of getGlyph() after the definition of qHash(GlyphAndSubPixelPosition). Merge-request: 2686 Reviewed-by: ossi
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-09-106-12/+49
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge fixes for QDir::operator==Shane Kearns2011-09-071-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Restore Qt4.7 behaviour of QFileInfo::absolute(File)PathShane Kearns2011-09-053-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many applications relied on the undefined behaviour that the filesystem engines returned clean paths (despite the documentation stating that they may not), and consequently suffered regressions with Qt 4.8. Unix paths are once again cleaned if necessary. Windows/Symbian paths were already cleaned, but now use the utility function to check if a path is dirty, to avoid duplicated code. Task-number: QTBUG-19995 Change-Id: If8c18469f149291c9d079ae3da23bc2087bbd49a Reviewed-on: http://codereview.qt.nokia.com/4154 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
| | * Fix comparison of absolute, unclean paths in QDirShane Kearns2011-09-023-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-09-081-10/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Split CFLAGS from pkg-config properly Ensure that the proxystyle is used over the style's own functions runonphone: Add a missing space between a message and the file name Perl check for windows configure. QSettings: don't assume XDG_CONFIG_HOME is latin1-encoded QSettings: use the common appdata dir when bootstrapping qmake on win Replace explicit surrogate handlers by inline methods of QChar class
| | * | QSettings: don't assume XDG_CONFIG_HOME is latin1-encodedKonstantin Ritt2011-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use QFile::decodeName() instead Merge-request: 1341 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| | * | QSettings: use the common appdata dir when bootstrapping qmake on winKonstantin Ritt2011-09-071-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QSystemLibrary doesn't depend on QObject, so nothing could stop us Merge-request: 1341 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | | Fix uninitialised variable in temporary filesShane Kearns2011-09-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbianFilePos variable was only initialised in the nativeOpen function and not in the constructor called init(). Due to the fix for QTBUG-4796, QTemporaryFile now bypasses the nativeOpen function. Zero initialising in init() ensures it is always valid (it only needs a non zero initialisation when opening a file for append, which is still covered by nativeOpen) Task-Number: QTBUG-21418 Reviewed-By: mread
* | | | Add documentation for Symbian QSettings locations and securityPasi Pentikainen2011-09-131-0/+47
|/ / / | | | | | | | | | | | | Task-number: QTBUG-11192 Reviewed-by: Miikka Heikkinen
* | | Merge remote branch 'mainline/4.8'Casper van Donderen2011-08-311-3/+3
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: tools/qdoc3/cppcodemarker.cpp tools/qdoc3/node.cpp
| * | Merge remote-tracking branch 'upstream/4.8'Sergio Ahumada2011-08-294-87/+166
| |\ \ | | | | | | | | | | | | | | | | Conflicts: tools/qdoc3/cppcodemarker.cpp
| * \ \ Merge remote-tracking branch 'mainline/4.8'Oswald Buddenhagen2011-08-265-8/+33
| |\ \ \
| * | | | Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'suzuki toshiya2011-08-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1299 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | | | Merge remote branch 'mainline/4.8'Casper van Donderen2011-08-304-109/+213
|\ \ \ \ \ | | |_|/ / | |/| | |
| * | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-08-274-87/+166
| |\ \ \ \ | | |_|/ / | |/| | / | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: (21 commits) Revert "Don't second-guess the "engine"; call cleanPath on absolutePaths" Revert "In 4.7 QFileInfo::absolute(File)Path returned clean paths" In 4.7 QFileInfo::absolute(File)Path returned clean paths ret is an "internal" path, no need to re-process it We prefer capitalized drive letters, make it so sooner Don't second-guess the "engine"; call cleanPath on absolutePaths Compare non-canonical paths before falling back on expensive computation Fix QDir::operator==(const QDir &) const Off-by-one error in assert condition... Leftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6 Merged fileTemplate test with QTBUG_4796 Cleanup code: removing empty stubs Fix QTemporaryFile regressions and new found issues Use "native paths" on POSIX platforms as well Cleanup #includes Add output on test failure Atomic implementation of create file and obtain handle for Win/Symbian Minimize encoding conversions when generating unique file name Use QStringBuilder when copying template for modification Make Symbian follow Windows code in temporary path generation ...
| | * | Revert "Don't second-guess the "engine"; call cleanPath on absolutePaths"João Abecasis2011-08-261-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07afddbf4bc029f776810381c7317fffa100eb60. This breaks QDir autotests on windows.
| | * | Revert "In 4.7 QFileInfo::absolute(File)Path returned clean paths"João Abecasis2011-08-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e32fca2c0f5252864d348df929d9858486763b1. The fix there is incorrect as it breaks QFileInfo autotests.
| | * | In 4.7 QFileInfo::absolute(File)Path returned clean pathsJoão Abecasis2011-08-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Let's play nice and keep that "feature". Task-number: QTBUG-19995
| | * | ret is an "internal" path, no need to re-process itJoão Abecasis2011-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | Where "internal" means that it uses Qt's separator '/', regardless of the native one.
| | * | We prefer capitalized drive letters, make it so soonerJoão Abecasis2011-08-261-2/+3
| | | | | | | | | | | | | | | | Reviewed-by: Prasanth Ullattil
| | * | Don't second-guess the "engine"; call cleanPath on absolutePathsJoão Abecasis2011-08-261-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures there is a single definition of what constitutes an absolute path in Qt. Task-number: QTBUG-19995 Reviewed-by: Prasanth Ullattil
| | * | Compare non-canonical paths before falling back on expensive computationJoão Abecasis2011-08-262-0/+9
| | | | | | | | | | | | | | | | Reviewed-by: Prasanth Ullattil
| | * | Fix QDir::operator==(const QDir &) constJoão Abecasis2011-08-262-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | Off-by-one error in assert condition...João Abecasis2011-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While this was safe, it was also over-zealous, disallowing the path from ending with the placeholder... Incidentally, the default. Laughed-at-by: w00t_
| | * | Leftovers from 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6João Abecasis2011-08-181-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This no longer necessary template specialization went unnoticed inside the Windows/Symbian #ifdef. It breaks compilation on those platforms, now that qstringbuilder.h is not included and QConcatenable is unknown to the compiler.
| | * | Fix QTemporaryFile regressions and new found issuesJoão Abecasis2011-08-171-50/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the file template is always processed in original QString format. Trying to generate native paths before adding a missing placeholder mask could change the meaning of templates, such as "." and "..", which are now tested to mean "..XXXXXX" and "...XXXXXX", respectively. After ensuring the template includes a placeholder mask, the path is converted to a native *absolute* file path and the mask is sought for again. On Windows, native paths were already absolute. On Symbian, we'd need at least a clean path, as "." and ",," are not natively understood. There is a requirement that the placeholder mask /XXXXXX+/ makes it through this conversion unaltered, which relaxes prior requirements on *nix platforms. On Windows and Symbian the conversion is under Qt's control and not user-configurable. Reviewed-by: Shane Kearns
| | * | Use "native paths" on POSIX platforms as wellJoão Abecasis2011-08-171-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And don't rely solely on "local8Bit" conversions. QFile defines an API for overriding how encoding conversions are done for filenames. In generating unique names, QTemporaryFile ignored that API and hardcoded the use of local 8-bit, implicitly assuming that that was appropriate. With this change, we switch that assumption to one where user supplied encoding function keeps the byte value of 'X' and '/', also assuming that encoded 'X' takes up a single-byte (i.e., the byte sequence for "XXXXXX" remains unchanged). There was also, and there still is an assumption in name generation that byte values for ASCII alpha-numeric characters are valid in the "native" encoding. In practice this change is compatible with UTF-8, Latin-1 and other ISO/IEC 8859 encodings. At any rate, it's very likely that only UTF-8 is relevant here. Reviewed-by: Denis Dzyubenko
| | * | Cleanup #includesJoão Abecasis2011-08-171-2/+0
| | | | | | | | | | | | | | | | These are already required and included by qfsfileengine_p.h.
| | * | Atomic implementation of create file and obtain handle for Win/SymbianJoão Abecasis2011-08-171-49/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides generating a unique name, createFileFromTemplate now also acquires a file handle on all platforms. The file engine's native handle is passed by reference and modified in place. This fixes a long standing security issue on Windows. On Windows and Symbian platforms we directly use the "native" file path when processing the template and generating the unique name. Since the native encoding is known, conversions at this point are safe. Errors other than "file exists" are propagated to Q(Temporary)File, and result in a failure in open(). The changes also unify error handling and should give consistent behaviour across all platforms. Worthy of note, there's a change in behaviour on Windows and Symbian: fileNames returned by QTemporaryFile on Windows and Symbian are always absolute after open has been called. This has to do with how QFileSystemEntry::nativeFilePath works on these platforms. (Test was updated to reflect change in behaviour.) Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
| | * | Minimize encoding conversions when generating unique file nameJoão Abecasis2011-08-171-15/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With minor adjustments, createFileFromTemplate is made to work directly on (UTF-16) QString data, which is already in the native encoding for Windows and Symbian. This is possible because the function only fills out the placeholder sub-string, without touching adjacent characters. This eliminates unnecessary conversions on those platforms. Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
| | * | Use QStringBuilder when copying template for modificationJoão Abecasis2011-08-171-15/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids modifying the original string in the case where a placeholder marker is not found. By marking the variable const we further avoid checks on the reference count and detaches, also allowing us to safely reuse it later in the function. The new approach also fixes an issue where suffix wasn't empty, but the toLocal8Bit conversion would be. This resulted in a buffer overflow inside createFileFromTemplate. Reviewed-by: Shane Kearns
| | * | Make Symbian follow Windows code in temporary path generationJoão Abecasis2011-08-171-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the one hand, we stop using OpenC here. On the other, we no longer use an atomic create and obtain file handle API -- just as we don't on Windows yet. This is a stepping stone to removing back and forth conversions of path names when generating unique names and also towards the use of native APIs for creating and obtaining a file handle atomically. Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
| | * | Encapsulate pointer manipulations to createFileTemplate functionJoão Abecasis2011-08-171-15/+18
| | |/ | | | | | | | | | | | | , where we actually control how we use the pointers. Reduce some code duplication in #ifdefs.
| * | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into ↵Qt Continuous Integration System2011-08-195-8/+33
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: Doc: Fixed qdoc warnings. Doc: Fixed qdoc warnings. Improved comment finding code. Added language information to the pure documentation parser. Doc: Fixes to Qt tutorial Fixed external link to DevNet Wiki. qdoc: Fixed a crash caused by accessing a null pointer. Doc: Fixed the example of an encoded URL in the class description. Doc: Added a copy of the online style images for the qdoc manual. Doc: Removed the Google Analytics script.
| * | Avoid spurious detaching in QDir::to/fromNativeSeparatorsJoão Abecasis2011-08-111-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Use fromLocal8Bit for reversing toLocal8BitJoão Abecasis2011-08-111-1/+1
| | | | | | | | | | | | | | | path is converted to 8-bit encoding using toLocal8Bit in QTemporaryFileEngine::open. The reverse operation should be used here.
| * | Don't convert template's path separators againJoão Abecasis2011-08-111-1/+1
| | |