summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* remove extra includesRitt Konstantin2010-09-211-1/+0
|
* Restore 4.7.0 behavior that non-existing paths are possible.Thomas Zander2010-09-161-2/+3
| | | | | | | Changing a relative path to a non-existing absolute path used to work, this should work again after this patch. Reviewed-by: João Abecasis
* Fix the bug for QSettings on Windows, to store qint32/quint32, ↵Liang Qi2010-09-101-3/+21
| | | | | | | | | qint64/quint64 in Windows registry. Reviewed-by: Prasanth Ullattil Reviewed-by: Joerg Bornemann Task: QTBUT-13249 AutoTest: Included
* Update the error handling of invalid hostnames in QUrl.Thiago Macieira2010-09-101-6/+19
| | | | | | | | | | | | This should let QUrl::errorString() show the original, invalid hostname in the URL it reports to be invalid. There may be a side-effect that QUrl::toEncoded() may include the broken hostname on the first call, then miss it in the next calls. But since QUrl::isValid() is returning false, we can consider that the result of toEncoded() is undefined, so anything goes. Reviewed-by: Olivier Goffart
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-09-086-449/+387
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (27 commits) Work around a compiler bug on 64-bit. Fix handling of braces/no-braces in QUrl::host / setHost. Changes (and minor corrections) to QByteArray documentation. QtWebKit: Update tag files to match the same content on qtwebkit.git QtWebKit: Downstream patch 2 fixing a crash on MSVC 64bit. QtWebKit: Downstream patch 1 fixing a crash on MSVC 64bit. uic: Fix compile breakage in case QT_NO_QT3_SUPPORT. uic: Improve messages. Tools (uic/rcc): Improve warning messages. QDir: Removed checks for existance of fileEngine QDir and QFileInfo shouldn't lose properties when detaching Another bug-o introduced in fixing QDirPrivate refactoring Reverting QDir::detach introduced earlier QFileInfo: Prepare for engine-less implementation Removed QFileInfoPrivate::initFileEngine Simplify QDir::cd QDir::makeAbsolute could self-destruct on failure QDir::operator= simplification QDirPrivate refactoring QDirPrivate refactoring ...
| * Fix handling of braces/no-braces in QUrl::host / setHost.Thiago Macieira2010-09-081-0/+4
| | | | | | | | | | | | | | | | | | The hostname is supposed to be stored in canonical form, with the braces. However, if you call url.setHost("::1"), then a non-canonical hostname is stored. So make the canonicalisation function correct this. Task-number: QTBUG-13464 Reviewed-by: Markus Goetz
| * QDir: Removed checks for existance of fileEngineJoão Abecasis2010-09-071-49/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Directly or indirectly, all instances of QDir call QDirPrivate::setPath, which allocates a file engine and dereferences it. Any failures there should already lead to a crash or a bad_alloc exception being thrown in case of failure. Given that, QDir may be (and was) broken when compiling Qt with QT_NO_FSFILEENGINE, if no custom file engine and handler are provided. This being the case, it's pointless to check fileEngine for null all over the place. This simplifies the code and should allow for easier transition to file-engine-less implementation. Reviewed-by: Thomas Zander
| * QDir and QFileInfo shouldn't lose properties when detachingJoão Abecasis2010-09-072-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | For QFileInfo, the caching state was being lost on the different setFile overloads. QDir::cd and ::makeAbsolute were losing filters and sorting flags. QDir issues were introduced with these patches: "Simplify QDir::cd" "QDir::makeAbsolute could self-destruct on failure" Reviewed-by: Prasanth Ullattil
| * Another bug-o introduced in fixing QDirPrivate refactoringJoão Abecasis2010-09-071-0/+1
| | | | | | | | Must clear file lists when changing the name filters.
| * Reverting QDir::detach introduced earlierJoão Abecasis2010-09-072-51/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | From the client API it is a broken concept, because it could leave the user with an uninitialized file engine. Fixing to initialize the file engine, would mean it is useless for internal use where file engines are initialized separately. In the end, removing both the QDir::detach introduced earlier and throwing away the private d_func'tions altogether is a binary-compatible change that should allow us to push this change in a patch release (fingers crossed!) Reviewed-by: Thiago Macieira
| * QFileInfo: Prepare for engine-less implementationJoão Abecasis2010-09-072-46/+59
| | | | | | | | | | | | | | | | | | The absence of a file engine was being interpreted as a synonym for a default constructed instance (or failed engine creation with QT_NO_FSFILEENGINE). By having an explicit flag, we open the door for bypassing file engine creation. Reviewed-by: Thomas Zander
| * Removed QFileInfoPrivate::initFileEngineJoão Abecasis2010-09-072-13/+4
| | | | | | | | | | | | | | | | As it served no real purpose. Instead, the relevant bits were inlined in the constructor that used it and makeAbsolute was adapted to use operator=. Reviewed-by: Thomas Zander
| * Simplify QDir::cdJoão Abecasis2010-09-071-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-09-071-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-09-071-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
| * QDirPrivate refactoringJoão Abecasis2010-09-071-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-09-071-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-09-071-25/+24
| | | | | | | | | | | | Moved common initialization code from QDir ctor to QDirPrivate. Reviewed-by: Thomas Zander
| * Removed QDirPrivate layer of indirectionJoão Abecasis2010-09-072-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-09-073-178/+161
| | | | | | | | | | | | | | The QFileInfoPrivate::Data member class is removed now. All the methods moved to QFileInfoPrivate. QFileInfoPrivate becomes a QSharedData type. Reviewed-by: Joao
| * Refactoring QDirPrivate::DataJoão Abecasis2010-09-071-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-09-072-89/+90
| | | | | | | | Reviewed-by: Joao
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-09-072-6/+7
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/Makefile.win32 src/corelib/io/qfsfileengine_win.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/gui/dialogs/qfiledialog_win.cpp src/gui/inputmethod/qcoefepinputcontext_s60.cpp src/gui/text/qfontdatabase_win.cpp src/gui/util/qsystemtrayicon_win.cpp src/script/utils/qscriptdate.cpp tests/auto/qinputcontext/tst_qinputcontext.cpp tests/auto/qscriptengine/tst_qscriptengine.cpp
| * Ensure that we load system libraries from the correct location.Jan-Arve Sæther2010-09-032-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a security hole that has been there for a while, but the public awareness have recently rised so the threat is more imminent now. The solution is to fix all places where we dynamically load system libraries. More specifically, we now load all system libraries with an absolute path that points to a library in the system directory (usually c:\windows\system32). We therefore introduce a small class named QSystemLibrary that only loads libraries located in the system path. This shares some of the API with QLibrary (in order to make the patch as small as possible). We don't fix QLibrary due to risk of regressions. In addition, applications can fix the code that calls QLibrary themselves. The problem does not apply to Windows CE, since the search order is documented as not searching in the current directory. However, it touches some CE-specific code - therefore QSystemLibrary is sometimes used on WinCE (however, it will just do a normal LoadLibrary() since its safe anyway). This change does not affect the testability plugin (it is not clearly documented where that plugin is located, and the plugin should never be used in production code anyway) Loading OpenSSL libraries The ssl libraries are handled specially, and searched in this order (we cannot expect them to always be in the system folder): 1. Application path 2. System libraries path 3. Trying all paths inside the PATH environment variable Task-number: QT-3825 Reviewed-by: Thiago Macieira Reviewed-by: Peter Hartmann
* | Doc: update the documentation of QUrl about HTML Form encodingThiago Macieira2010-09-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | HTML forms deviate slightly from URL encoding. They encode spaces as plus signs (+) and the plus sign is encoded as %2b. QUrl is a strict URL/URI tool, so it does not know about HTML form encoding. Add a note to the methods that encode/decode queries about this difference. Task-number: QTBUG-13403
* | Accept empty authority segments in QUrl as different from not-presentThiago Macieira2010-09-031-1/+1
| | | | | | | | | | | | | | | | | | See the task for discussion on why this is necessary and why it is correct from the point of view of the RFC defining URIs. Task-number: QTBUG-8701 Patch-by: Marja Hassinen Signed-Off-By: Thiago Macieira
* | Fix QProcessManager destructionMiikka Heikkinen2010-08-161-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If QProcessManager destructor is ran as part of global static cleanup, manager thread will most likely be terminated by kernel at that point, so trying to delete QProcessActives and QProcessMediators will panic as they will still be active. They can also no longer be properly canceled as the thread is already gone. In case manager thread has already died, which implies that process exit is imminent, we simply do nothing and let the deletion of the main heap at process exit take care of stray objects. Task-number: QTBUG-11218 Reviewed-by: Janne Koskinen
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7Jerome Pasion2010-08-091-0/+4
|\ \
| * | CreateFileMapping returns NULL on error , only tested with INVALID_HANDLE_VALUE.Carlos Manuel Duclos Vergara2010-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That code is deprecated for the most part, however under certain circumstances could be run. The fix is to check the value when using the deprecated code and change the return value to follow the logic of the new code. Task-number: QTBUG-12732 Reviewed-by: João Abecasis
* | | Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jerome Pasion2010-08-091-2/+2
|/ / | | | | | | | | Reviewer: David Boddie Task number: QTBUG-11938
* | Fixed potential infinite loop in QFileSystemWatcher on Mac.Denis Dzyubenko2010-08-021-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
* | Fixed spelling mistakes in documented functions, classes, etc. Part of ↵Jerome Pasion2010-07-291-1/+1
| | | | | | | | QTBUG-11938 and QTBUG-10801
* | doc: Fixed typos in QAbstractFileEngineIteratorRobert Loehning2010-07-201-3/+3
| | | | | | | | Reviewed-by: Alessandro Portale
* | Merge remote branch 'origin/4.7' into 4.7-from-4.6Rohan McGovern2010-07-172-3/+3
|\ \ | | | | | | | | | | | | Conflicts: tests/auto/qtexttable/tst_qtexttable.cpp
| * | doc: Fixed several qdoc warnings.Martin Smith2010-07-131-2/+2
| | |
| * | QIODPLB: Sync behavior of ungetBlock() and ungetChar()Andreas Kling2010-07-091-1/+1
| | | | | | | | | | | | | | | ungetChar() supports ungetting data that didn't originate from the QIODevicePrivateLinearBuffer, so ungetBlock() should too.
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-07-151-2/+2
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/page/FrameView.h src/3rdparty/webkit/WebCore/platform/ScrollView.cpp src/3rdparty/webkit/WebCore/platform/ScrollView.h src/corelib/plugin/quuid.cpp src/gui/dialogs/qfontdialog.cpp src/multimedia/audio/qaudiodevicefactory.cpp src/opengl/qgl.cpp src/openvg/qpaintengine_vg.cpp tests/auto/qxmlquery/tst_qxmlquery.cpp
| * Fix a couple of memory leaks due to not releasing CFTypes on MacAndy Shaw2010-07-091-2/+2
| | | | | | | | Reviewed-by: Prasanth Ullattil
* | add setNativeArguments() and nativeArguments()Oswald Buddenhagen2010-07-065-7/+67
| | | | | | | | | | | | | | | | | | | | this function enables starting subprocesses which need command lines which cannot be constructed via the portable list-based api. such cases would be programs which need quoting rules which diverge from the msvc runtime. Reviewed-by: joerg Task-number: QTBUG-7620 (and various others which boil down to that)
* | fix bogus return value from qprocess::execute()Oswald Buddenhagen2010-07-061-4/+10
| | | | | | | | | | Task-number: QTBUG-230, QTBUG-5866 Reviewed-by: joerg
* | doc improvementsOswald Buddenhagen2010-07-031-5/+4
| |
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7mread2010-07-021-3/+3
|\ \ | | | | | | | | | | | | | | | Conflicts fixed: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * \ Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7Geir Vattekar2010-06-293-12/+61
| |\ \
| * | | Doc: QSettings::sync() imports changes made by other processes.Geir Vattekar2010-06-291-3/+3
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-5949 Reviewed-by: Morten Engvoldsen
* | | | Avkon removal configured with -no-s60mread2010-07-012-11/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avkon dependencies can be configured out with the -no-s60 configure flag, conversely Qt on Symbian will use Avkon if -s60 is configured. These changes are intended to keep or introduce binary compatibility between the s60 and no-s60 configurations. To do this, it has been necessary to introduce stub equivalents of the CAknAppUi related classes into the no-s60 configuration, and override all Avkon framework virtual functions in the QS60Main... classes. Other than that, these changes are mostly just correcting the use of the Q_WS_S60 flag so that it only refers to Avkon dependencies. Reviewed-by: Sami Merila
* | | Manipulate buffer position via 'pPos' in peek()Andreas Kling2010-06-241-2/+2
| | | | | | | | | | | | Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | | Specialize peek() for QBufferAndreas Kling2010-06-173-19/+52
| | | | | | | | | | | | | | | | | | | | | This avoids going through the generic implementation in QIODevice and avoids a 16kB buffer allocation from QIODevicePrivateLinearBuffer. Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | | Implement QIODevice::peek() using read() + ungetBlock().Andreas Kling2010-06-162-7/+23
|/ / | | | | | | | | | | | | | | The previous implementation was doing ungetChar() in a loop. Task-number: QTBUG-9654 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: mread
* | fix for using .lnk files when running app from UNCZeno Albisser2010-06-041-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Since "" is an invalid target for a .lnk file, we can return false for doStat() in case of resolving the .lnk to "". Notice that .lnk files only allow absolute paths for the target. "" is returned by readLink in case the .lnk file does not exist. Reviewed-by: Joao Task-Number: QTBUG-10863
* | Avoid mmap() on symbian osShane Kearns2010-06-021-1/+1
| | | | | | | | | | | | | | | | | | QResource and QTranslator use mmap() on unix as an optimisation. Symbian OS doesn't support memory mapped files, so mmap() is actually worse than opening and reading the file yourself. So, switched off mmap() usage on symbian. Reviewed-by: mread