summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Fixed potential infinite loop in QFileSystemWatcher on Mac.Denis Dzyubenko2011-06-091-2/+3
| | | | | | | | | The patch provided by the customer just jumps to reading the next event fom the kqueue when an unexpected condition happens. Task-number: QTBUG-12533 Reviewed-by: Bradley T. Hughes (cherry picked from commit b7256b1f8c9bb43c5234d24453aaa8b1c079cf06)
* _close(fd) closes the associated handle and not the other way aroundJoão Abecasis2011-06-093-2/+22
| | | | | | | | | | | ... according to the online MSDN documentation. Hid the cachedFd member in private data under WinCE, since it's never used there. Task-number: QTBUG-9085 Reviewed-by: Zeno Albisser (cherry picked from commit 7986ab58b9a5d0828291c857d3ce86bfa1af4e6e)
* QFSFileEngine: don't look through NTFS junctionsRitt Konstantin2011-06-091-8/+2
| | | | | | | | | | | | | | | | Starting in 1216161584b730576c24fb128131838be1826b37, we started processing NTFS junctions as symbolic link. This reverts isSymlink() behavior back to former behavior and processes only symbolic junctions. The code path there worked just fine for directory symbolic links but lead to multiple issues for volume mount point junctions due to incompleteness. Task-number: QTBUG-7036, QTBUG-7384 Merge-request: 493 Reviewed-by: João Abecasis <joao@trolltech.com> (cherry picked from commit b4996ab8e3a26d45ee55593da281e4b798c04dd2)
* Don't write byte-order-mark after seek()Paul Olav Tvete2011-06-091-1/+2
| | | | | | | | | | | Ideally, we should write a BOM after seek(0) if setGenerateByteOrderMark has been called, but we don't store that information. This commit is an improvement for the default case when generateByteOrderMark is false, and also when seeking to any other position than 0. Task-number: QTBUG-6295 Reviewed-by: Olivier (cherry picked from commit 7837de27309c958dc5a5985afc55492ec3054ee0)
* Change to release licenses for 4.6.3.Jason McDonald2010-05-3073-949/+949
| | | | Reviewed-by: Trust Me
* Fix QUrl::isValid if the host contains invalid caracter.Olivier Goffart2010-05-141-2/+8
| | | | | | | If the host contains invalid caracter, QUrl::isValid should return false Task-number: QTBUG-10355 Reviewed-by: thiago
* QUrl: parsing of host name with an undercore.Olivier Goffart2010-05-141-1/+3
| | | | | | | | | This is not supposed to be allowed, but it work with other browsers Rask-number: QTBUG-7434 Reviewed-by: Thiago Reviewed-by: Markus Goetz (cherry picked from commit a8065da96b96fcc4baeca7615c2a4195c05cbc03)
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-05-081-2/+7
|\ | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QUrl: fix parsing of IRIs with more than one IDN label QUrl: update the whitelist of IDN domains
| * QUrl: fix parsing of IRIs with more than one IDN labelThiago Macieira2010-05-081-0/+1
| | | | | | | | | | Task-number: QTBUG-10511 Reviewed-by: Trust Me
| * QUrl: update the whitelist of IDN domainsThiago Macieira2010-05-081-2/+6
| | | | | | | | The list is taken from the Mozilla page.
* | Fixed bug in QIODevice::read after first reading 0 bytes.Samuel Rødal2010-05-061-0/+3
|/ | | | | | | | | | | | Change 02532ec80375c686503c4250c6ad6bb211515ec8 removed the early-exit for 0 byte reads, causing us to hit code that assumed the buffer was empty since nothing was read. It would thus read more into the end of the buffer, causing the buffer to grow bigger than QIODEVICE_BUFFERSIZE. Next, if the actual number of bytes we wanted to read was bigger than the original buffer size we'd read the same data twice. Reviewed-by: João Abecasis Reviewed-by: Thiago Macieira
* Fix QSslSocket::constructing autotest failureJoão Abecasis2010-04-191-7/+6
| | | | | | | | | | | | | | | | The optimizations in d0645d1792e1cbdf417a923ea071975e4390fccd did not take into account 0-length reads, used in network programming to check connected state. By not returning early in the case where lastReadChunkSize == maxSize and maxSize == 0, we allow the underlying device to report error conditions on 0-length reads. This reverts commit aea71e2e02fa966842b094244bc3f5fc88f50f41, while still ensuring that QIODevice::read() returns -1 on a closed device. Reviewed-by: mread Reviewed-by: Thiago Macieira
* Fix autotest failure: QIODevice::read() on a closed device must return -1Thiago Macieira2010-04-141-0/+1
|
* Document Symbian platform security requirements on Qt APIsFrans Englich2010-04-121-0/+18
| | | | | | | | | Work done jointly by Gareth and me. Yields no qdoc errors. Task-number: QTBUG-9342 Task-number: QTBUG-9120 Reviewed-by: Gareth Stockwell Reviewed-by: David Boddie
* Fix error reporting when symbian file copy fails.Shane Kearns2010-03-242-2/+42
| | | | | | | When a file copy failed on symbian, the file engine error was not set. Now translates the symbian os error code to set the file engine error. Reviewed-by: Marius Storm-Olsen
* QIODevice::read() and QFile::atEnd() performance improvementsmread2010-03-244-78/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | atEnd improvements, since atEnd is used in published example Qt read loops. The two main ideas are to push the buffer test forward, which optimises the normal buffered case, and to cache the file size till you get to the end, which otherwise has to get the file size every 16K of data. read buffer improvements: The ring buffer structure was causing significant performance overheads. In practice QIODevice has much simpler requirements on its read buffer, and a linear buffer can be used instead. This now uses a buffer optimised to QIODevice's use of it. QIODevice read function improvements. There are a number of sub-themes here, which all are aimed at getting the normal buffered path through the code done as fast as possible. This gives greatest improvements for small reads, but it is these small reads that have the biggest problems. - removing the isSequential test, by setting a pointer to the qint64 to update and using a dummy qint64 target when isSequential, then writing through the pointer. - doing the readability check on the first read only, out of the fast path - doing the maxSize<0 test after the getchar fast path - removing the buffer isEmpty test and giving a fast exit test instead - moving arithmetic out of the fast path, so "data" and "maxSize" are now dynamically updating - for RCVT builds, ARM mode is used for the read functions because the 64-bit operations are much slower with this compiler in Thumb mode There are some other changes to read() which improve clarity: - bytesToBuffer is now always set to QIODEVICE_BUFFERSIZE. This has always been the case, its just that the logic was not clear before. - moreToRead is set to false now in the case where the request was met by a direct device read. Leaving it true in this case was pointless, and setting it true in the converse case seems dangerous because the function might iterate for a very long time, although it might meet the API semantics better and would be a change in behavior because the function used to not read more when it claimed it would. Reviewed-by: Joao Reviewed-by: Aleksandar Babic
* Removed extra space from the command line passed to QProcess in SymbianMiikka Heikkinen2010-03-191-2/+6
| | | | | Task-number: QTBUG-8906 Reviewed-by: Janne Koskinen
* Handle Symbian's file name encoding, correctly.Alessandro Portale2010-03-161-6/+10
| | | | | | | | | On Symbian, we incorrectly assumed that filenames are encoded in local8bit. OpenC's implementation of wcstombs, mbstowcs, etc. are all UTF-8, regardless of the locale. Task-number: QTBUG-7175 Reviewed-by: Shane Kearns
* Doc: Removed lie that access to QBuffer is unbuffered.Simon Hausmann2010-03-111-2/+1
| | | | | | | In fact QIODevice still _does_ buffer access through QBuffer currently. Reviewed-by: Markus Goetz Reviewed-by: Joao
* Fixed crash at application exit when QProcess was used in SymbianMiikka Heikkinen2010-03-051-0/+2
| | | | | | | | | QProcessManagerMediator and QProcessActive were not properly canceled in their destructors, causing crash when global static QProcessManager was deleted. Task-number: QTBUG-7735 Reviewed-by: Janne Anttila
* Do not use realpath() with uclibcMarkus Goetz2010-03-041-0/+3
| | | | | Task-number: QTBUG-8365 Reviewed-by: denis
* Symbian file system use optimisation for stat and symlinksmread2010-02-261-0/+10
| | | | | | | | | | | | | Symbian implementation of fileFlags calls both doStat and isSymlink resulting in calls to both stat and lstat. However most of the time, ie when accessing a normal file rather than a symlink, lstat gives all the information we require. So this change uses lstat where possible, and caches its result for both doStat and isSymlink. During start of DesktopServices app, this cuts calls to stat/lstat by 45%. Reviewed-by: Shane Kearns
* Fix a signed/unsigned comparison compiler warningJoão Abecasis2010-02-251-1/+1
|
* Cleaning of the patch to QTBUG-3168Benjamin Poulain2010-02-251-2/+2
| | | | | | | Removing trailing whitespace from qurl.cpp Removing a debug() output from the test. Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Patch to QTBUG-3168Carolina Gomes2010-02-251-5/+22
| | | | | | | Patch to QTBUG-3168 and update tst_qurl to enable the test case that was skipped. Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* doc: Corrected typo.Martin Smith2010-02-231-2/+2
| | | | Task: QTBUG-8450
* doc: Added \obsolete.Martin Smith2010-02-232-7/+10
| | | | Task: QTBUG-8083
* amend the doc, as suggested by rittkOswald Buddenhagen2010-02-221-3/+2
| | | | Task-number: QTBUG-8070
* Fix a deadlock in kqueue implementation of QFileSystemWatcherBradley T. Hughes2010-02-161-4/+14
| | | | | | | | | | | | | | When adding and removing lots of files, the kqueue implementation's pipe between the worker thread and the main interface would fill up, causing the thread adding/removing files to block even though the worker thread was no longer running. The kqueue interface gives us information about how much data is available on the pipe (the data member of the kevent struct), so we should use this to make sure we always empty the pipe. We then iterate over all the command bytes and make sure we interpret them correctly. Reviewed-by: Prasanth Ullattil
* doc: Added \section1 about serializing operators for Qt collections.Martin Smith2010-02-161-0/+7
| | | | Task: QTBUG-8070
* doc: Fixed several typos.Martin Smith2010-02-121-1/+1
| | | | Task: QTBUG-7997
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into ↵Qt Continuous Integration System2010-02-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/berlin-staging-1: Assistant examples: Fix missing QLatin1String. Added Czech translations. Webkit: Fix missing namespace. qmake: subdirs template: make distclean target use QMAKE_DISTCLEAN qmake: fix warnings qmake: Remove macro and simplify string expression previously using it qmake: use isActiveConfig() instead of hand-crafting comparisons Fix missing namespace. Assistant: Fix spelling mistakes. Assistant: Use const references in foreach loops. optimization: get rid of QString::fromUtf16() usage document QString::fromUtf16() slowness remove duplicated calculation of length remove pointless conditionals micro-optimization optimize qhash() Designer/uic/related examples: Fix source code scanning issues II.
| * optimization: get rid of QString::fromUtf16() usageOswald Buddenhagen2010-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QString::fromUtf16() is slow - it does a BOM check and optionally byte swapping, which is utterly pointless when converting internal data structures which are raw utf16 in host byte order anyway. so replace it with QString::fromRawData() (for short-lived strings) or QString(const QChar *, int) (otherwise) if possible. Reviewed-by: axis Reviewed-by: mariusSO Reviewed-by: Bill King
* | Fixed no-timeout case for QProcess::waitForFinished in SymbianMiikka Heikkinen2010-02-011-17/+24
| | | | | | | | | | | | | | | | | | QProcess::waitForFinished was panicking in Symbian when timeout of -1 was supplied. Fixed it to disable timeout and block until process exit, as docs indicate it should. Task-number: QTBUG-7667 Reviewed-by: Janne Anttila
* | Catch by reference rather than by valueIain2010-02-011-1/+1
|/ | | | | | | | | Catching by value causes GCC to use the compiler support function __cxa_get_exception_ptr. This is not available in the compiler support libraries on Symbian OS prior to Symbian^3. Catching by reference avoids this problem. Reviewed-by: mread
* Core classes, examples, demos: Some changes from string to charMarkus Goetz2010-01-281-1/+1
| | | | Reviewed-by: Peter Hartmann
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-281-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (70 commits) doc: Fixed the last qdoc errors. doc: Document the "Type" enum value as a const in variable. Designer: Add lower/raise to context menu. Compile with no-webkit - add missing semi-colons. Fixes visibility update missing when doing setParentItem on graphicsitem Stabilize tst_QGraphicsScene::polishItems2 (new test) Fixed an infinite loop that could occur when reading invalid BMP images. Updated docs regarding QGLWidget::renderText() limitations. Added optimization flag to QGraphicsItemPrivate. Fixed child items with graphics effects not inheriting opacity. Made the trace replayer handle limited resolution cases better. Small optimization in raster paint engine. Another ASSERT while deleting spans Implement QDirectFBPixmapData::scroll Potential crash when adding items from QGraphicsWidget::polishEvent(). QGraphicsWidget is painted twice on the inital show. Fix QPainter::redirection() to pass autotest. Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. revert parts of 10392eef4fd4f9 Fix y-inverted pixmaps properly. ...
| * Autotest: add a test for allowing hostnames ending in dotThiago Macieira2010-01-221-1/+1
| | | | | | | | Also, since domain is never empty, the idx > 0 test is unnecessary.
| * Fix QUrl::toAce for domains with dot at endThorvald Natvig2010-01-221-1/+4
| | | | | | | | | | Merge-request: 436 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* | Fix QSettings default paths not being initialized when setPath() is calledDaniel Molkentin2010-01-271-19/+25
|/ | | | | | | | | | | | | This only coincidently worked on Linux, because it creates a QSettings object to read system settings before any user data was executed, thus initializing the static default path data. However, if only the SystemPath was modified, the UserPath never got initialized on non-Linux platforms, causing settings for the users below $PWD. Also, it removes unncessary checks and mutex locks, which should give a slight speed up. Reviewed-By: dt
* Revert "Make an empty QUrl also be considered non-detached (d == 0)."Thiago Macieira2010-01-211-1/+1
| | | | | | as agreed with Warwick. This reverts commit 089ee7094eabb2058b478f5d2f306a69f6c0b3bf.
* QFile::readData: Simplify codeJoão Abecasis2010-01-181-6/+2
| | | | Reviewed-by: Markus Goetz
* If the file is open, there must be an engine.João Abecasis2010-01-181-6/+9
| | | | | | | Don't try to allocate one for QFile::handle and QFile::flush since they'll be useless there. Reviewed-by: Markus Goetz
* QFile: Fix a pre-mature pessimizationJoão Abecasis2010-01-181-44/+42
| | | | | | | Don't repeatedly call the fileEngine virtual function. Instead re-use the private data member if we know it has been filled. Reviewed-by: Markus Goetz
* QFile::remove: don't fail for unrelated errorsJoão Abecasis2010-01-141-0/+1
| | | | | | | | remove was checking for errors from close, but without clearing the error state beforehand it ended picking unrelated errors. Task-number: QTBUG-7285 Reviewed-by: qCaro
* Remove erroneous warning in QFileInfo::absolutePath()Andreas Kling2010-01-131-2/+5
| | | | | | QFileInfo().absolutePath() is legal and shouldn't produce a warning. Reviewed-by: João Abecasis
* Add a way to access the normalised URL in QUrl.Thiago Macieira2010-01-111-4/+8
| | | | | | | | | | | | This is private API for now. For 4.7, decide whether to have a public method for this. Also investigate whether to provide a qHash function. Adding one to Qt would break source- and binary-compatibility with code that already has that (like Soprano). Patch-By: Warwick Allison Reviewed-by: Thiago Macieira
* Avoid repeatedly calling LookupAccountSid in QFSFileEngine::ownerRitt Konstantin2010-01-071-10/+21
| | | | | | | | | | | | Try to retrieve user/group name in a single call to LookupAccountSid, by using pre-allocated buffers. Only call a second time if the buffer size is insufficient. 64 bytes should be enough in common case. Previously, we would always call LookupAccountSid twice, even if ERROR_NONE_MAPPED occured first time. Merge-request: 815 Reviewed-by: João Abecasis <joao@trolltech.com>
* improve readability a bit moreRitt Konstantin2010-01-071-8/+8
| | | | | Merge-request: 815 Reviewed-by: João Abecasis <joao@trolltech.com>
* fix styling; improve readabilityRitt Konstantin2010-01-071-36/+33
| | | | | | | | | | * tabs -> spaces; * if( -> if ( * some strings rearranged. no code changes! Merge-request: 815 Reviewed-by: João Abecasis <joao@trolltech.com>