summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Build fix for -qtnamespace.Leandro Melo2010-09-302-0/+9
| | | | | Reviewed-by: Thiago Macieira (cherry picked from commit b8089f0b7a0fef9318070aea9c8344bfe987bac9)
* Add missing license headerJan-Arve Sæther2010-09-062-0/+82
| | | | Task-number: QT-3825
* Compile fix WinCEJan-Arve Sæther2010-09-032-5/+14
| | | | Task-number: QT-3825
* Ensure that we load system libraries from the correct location.Jan-Arve Sæther2010-09-036-13/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix Qt applications freezing until mouse/keyboard events occur.Bradley T. Hughes2010-08-301-4/+9
| | | | | | | | | | | | While the qt_GetMessageHook() is executing, GetQueueStatus() reports that there are timer messages in the queue, but these are never actually seen by the hook. Calling PeekMessage() will never return these messages (which is what we really want to know), so don't use GetQueueStatus() with QS_TIMER. Task-number: QTBUG-12721 Reviewed-by: denis Reviewed-by: joao
* Doc: typo fixed in qlibraryinfo.cppJoerg Bornemann2010-08-091-1/+1
| | | | Reviewed-by: TrustMe
* Compile when bootstrapping qmakeBradley T. Hughes2010-07-131-4/+12
| | | | | | | QThreadStorage is not available when bootstrapping qmake, so fall back to a simple static bool instead. Reviewed-by: TrustMe
* Fix regression in tst_qrand::testqrand()Bradley T. Hughes2010-07-132-8/+15
| | | | | | | | | | | | | | | | | qrand() has seeded with a default value of 1 for quite a long time, and is checked by the test mentioned above. The previous commit to change the default seed value must be reverted to keep compatibility. Change qrand() and qsrand() back to the way they were in 4.5. This fixes the qrand() regression. Change QUuid::createUuid() to seed exactly once per thread, which is a change from 4.5, where QUuid would see only once per application. This solves the original bug, QTBUG-3543, where multiple threads would generate the same UUID sequences. This also fixes the regression reported in QTBUG-11213, where seeding did not happen in certain cases. Reviewed-by: Prasanth Ullattil
* Fix a crash when recursing into QSharedPointer from QSharedPointer::clear()Thiago Macieira2010-07-091-14/+17
| | | | | | | | | | | | | We used to delete the tracked object before the new tracking was properly set up in QSharedPointer. That means if the tracked object's destructor or deletion function recursed into the QSharedPointer, it would find itself in an inconsistent state. So instead finish the setup and only then call out to user code. That ensures the internal state is always valid. Task-number: QTBUG-11730 Reviewed-by: ossi
* Fix a couple of memory leaks due to not releasing CFTypes on MacAndy Shaw2010-07-091-2/+2
| | | | Reviewed-by: Prasanth Ullattil
* CompileBradley T. Hughes2010-07-081-0/+1
| | | | | | Re-add the stdlib.h include, since it brings in RAND_MAX Reviewed-by: TrustMe
* QUUid::createUuid() should not generate identical sequences on UNIXBradley T. Hughes2010-07-082-58/+12
| | | | | | | | | | | | | | | | An unintended side-effect of commit 90a082c9076f35dcca092ade019891e92692710e is that if qrand() is used without being seeded first, then createUuid() would always generate the same sequence. This quite likely to happen considering the Qt does not actually seed the PRNG, but does use it in many places (we do not call qsrand(), but we do often call qrand()). Fix this by changing qrand() to calculate a seed, instead of defaulting to 1. This allows us to remove the qsrand() overload with no arguments, since qrand() will now seed automatically unless manually seeded by the programmer. Task-number: QTBUG-11213 Reviewed-by: thiago
* typos fixedJoerg Bornemann2010-07-071-1/+1
| | | | Reviewed-by: TrustMe
* Revert "Support time zone designator in QDateTime::fromString() based on ISO ↵Liang Qi2010-07-052-29/+3
| | | | | | 8601-2004 standard." This reverts commit 752d46c90ee0fc5f06f01feedd8e0659178b15d4.
* Support time zone designator in QDateTime::fromString() based on ISO ↵Liang Qi2010-07-052-3/+29
| | | | | | | | | 8601-2004 standard. Task-number: QTBUG-11623 Reviewed-by: Denis Dzyubenko Reviewed-by: David Boddie
* Using the remaining valid data to construct the QTime object when msec ↵Liang Qi2010-07-011-1/+1
| | | | | | | | parsing failed. It's relevant with QTBUG-11623, but not a fix for it. Reviewed-by: Aleksandar Sasha Babic
* Revert "Fixing the race condition in event dispatcher implementation on"axis2010-06-242-56/+10
| | | | | | | | | | | | | | | | | This reverts commit 5f21450a61ba2459e6dc5b08b236b15a067bf81f. It's the wrong fix for the problem. The socket operations in the select thread are not supposed to be thread safe. It is thread safe between the select thread and the caller thread, but not if there are more than one caller thread. Ensuring complete thread safety would probably require fixes in other areas as well. The correct fix is for the client to ensure that calls to the socket registering functions are either serialized or contained within one thread. Task: QT-3358 RevBy: Aleksandar Sasha Babic
* Revert "Fixing race condition in qeventdispatcher_symbian.cpp code path"axis2010-06-242-66/+40
| | | | | | | | | | | | | | | | | This reverts commit 3a9ca8ba50a63e564c15023f65cbac36d365d309. It's the wrong fix for the problem. The socket operations in the select thread are not supposed to be thread safe. It is thread safe between the select thread and the caller thread, but not if there are more than one caller thread. Ensuring complete thread safety would probably require fixes in other areas as well. The correct fix is for the client to ensure that calls to the socket registering functions are either serialized or contained within one thread. Task: QT-3496 RevBy: Aleksandar Sasha Babic
* Fixing race condition in qeventdispatcher_symbian.cpp code pathAleksandar Sasha Babic2010-06-212-40/+66
| | | | | | | | Fixing QT-3496. There was race condition for m_AOStatuses between external and QSelectThread. Task-number: QT-3496 Reviewed-by: TrustMe
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-06-151-2/+2
|\ | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Bump version number after 4.6.3 release.
| * Bump version number after 4.6.3 release.Jason McDonald2010-06-151-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-06-141-32/+2
|\ \ | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix issues with thai line breaking
| * | Fix issues with thai line breakingLars Knoll2010-06-141-32/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge latest harfbuzz: commit cce760d41f115fecd5b9b6b20b62883b10a9c204 Author: Lars Knoll <lars.knoll@nokia.com> Date: Mon Jun 14 14:14:59 2010 +0200 Fixes for thai linebreaking * Load libthai.so.0 since libthai.so is not there on all systems * Remove dependency on codecs. Unicode->TIS620 is so simple we can simply hardcode it in harbuzz-thai.c * Speed up detection of word boundaries * Falback when libthai is not found is now to not break instead of breaking after every character (in line with recommendations from unicode.org linebreaking algorithm) Reviewed-by: Simon Hausmann Adapt qharfbuzz.cpp to the changes in harfbuzz. Reviewed-by: Simon Hausmann
* | Fix incorrect line breaking in QtWebKit.Pierre Rossi2010-06-111-3/+9
|/ | | | | | | | | | | | | | | QTextBoundaryFinder was not consistent with ICU. See also: https://bugs.webkit.org/show_bug.cgi?id=31076 The previous definition of a line break was that the index in the string after which the line break should occur. Now it is the index of the boundary at which the break should occur (hence one more). Task-number: QT-3495 Reviewed-by: Simon Hausmann Reviewed-by: Lars Knoll
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-05-282-14/+4
|\ | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: test QMultiMap::operator+= and QMultiHash::operator+= QMultiMap/QMultiHash: must qualify identifier to find this declaration in dependent base class
| * QMultiMap/QMultiHash: must qualify identifier to find this declaration in ↵Olivier Goffart2010-05-282-14/+4
| | | | | | | | | | | | | | | | | | | | dependent base class This is required as some compiler such as clang or rvct respect the standard more than gcc Reviewed-by: thiago Reviewed-by: hjk
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-05-281-2/+2
|\ \ | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Handle exceptions notified by select before read/write.
| * | Handle exceptions notified by select before read/write.Janne Anttila2010-05-281-2/+2
| |/ | | | | | | | | Task-number: MOBILITY-800 Reviewed-by: Aleksandar Sasha Babic
* | Added support for Indonesian language on Symbian.Denis Dzyubenko2010-05-281-1/+2
| | | | | | | | | | | | | | | | We have support for ELangIndonesian, but we also need to support new ELangIndonesian_Apac which has appeared in Symbian^3. Task-number: QT-3369 Reviewed-by: trustme
* | Fix for Norwegian and Korean languages on symbian.Denis Dzyubenko2010-05-282-60/+62
| | | | | | | | | | | | | | | | | | | | Last commits added Norwegian Nynorsk and Korean locales support, however the array that contains the mapping between symbian locale constant and locale string should be sorted to work. Task-number: QT-3368 Task-number: QT-3370 Reviewed-by: trustme
* | Added Korean and Nynorsk locales support on Symbian.Denis Dzyubenko2010-05-281-0/+2
|/ | | | | | Task-number: QT-3368 Task-number: QT-3370 Reviewed-by: Thiago Macieira
* Fix regression in QVarLengthArray::operator=João Abecasis2010-05-261-8/+7
| | | | | | | | | | | | | | | | | | | There was a serious regression wherei, under certain conditions, assignment would be treated as an append. This was due to poor tracking of container invariants inside realloc. From now on, after the allocation decision, s shall contain the number of elements in the array to be kept. Deleting extra elements in the old array needn't update this value. Instead, it needs to be updated once and if new elements are created afterwards. Auto-test greatly expanded to avoid future embarassments. Task-number: QTBUG-10978 Reviewed-by: Olivier Goffart Reviewed-by: Fabien Freling Olivier reviewed the patch, Fabien the auto-test.
* QTBUG-5955: Qt fails to build on alpha architectureFathi Boudra2010-05-251-6/+6
| | | | | | | | - add alpha platform support based on JavaScriptCore from src/3rdparty/webkit copy. - fix invalid type conversions on alpha architecture. Merge-request: 640 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixing the race condition in event dispatcher implementation onAleksandar Sasha Babic2010-05-212-10/+56
| | | | | | | | | | | | | | | | | | Symbian platform New socket related requests are comming into QSelectThread by interrupting the select call by writing to pipe. One of the criteria is that m_mutex (from QSelectThread) could be locked, meaninig that QSelectThread is in m_waitCond.wait() call. However, the m_mutex can be locked by other contenders trying to post new requests in burst. This would trigger writing to pipe in false situations, making QSelectThread to hang in waitCond as no wakeAll will come until some next request (in future) kicks in. Task-number: QT-3358 Reviewed-by: Janne Anttila
* Switch Symbian^3 QCursor implementation back to 5.0 wayShane Kearns2010-05-201-2/+0
| | | | | | | | | | | | | The window server bug with pointer cursors may not have been fixed, in any case enabling pointer cursors on Symbian^3 requires WriteSystemData capability which isn't available to all applications. This change fixes the "qt_s60_setWindowGroupCursor - null handle" warnings when using the touch screen. Tested with QCursor manual test (tst_allcursors) Reviewed-by: Sami Merila
* 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)
* Improved mapping of locales on symbian.Denis Dzyubenko2010-05-101-1/+1
| | | | | | | | | Map Latin American Spanish to es_MX - Spanish in Mexica - the locale data for those two locales are the same, so it should be more or less safe. The proper solution is to add support for es-419_419 and es_419 locales to QLocale. Task-number: QT-3312 Reviewed-by: trustme
* 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.
* | Adding some error checking for setdefaultifAleksandar Sasha Babic2010-05-071-1/+3
| | | | | | | | | | Task-number: QT-3284 Reviewed-by: TrustMe
* | Making network reconnect happen after teardown.Aleksandar Sasha Babic2010-05-071-2/+6
| | | | | | | | | | | | | | | | | | When the network connection teardown happens we get notification on except FD. As advised from Open C team we will use setdefaultif(0) to kill all existing sockets and restart default IAP. Task-number: QT-3284 Reviewed-by: Janne Anttila
* | 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 qt_wince_bsearch for low nonexistent key valuesJoerg Bornemann2010-05-051-4/+6
|/ | | | | Task-number: QTBUG-10043 Reviewed-by: thartman
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-301-2/+2
|\ | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed a leak in QTextDocument::print(). Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent.
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-301-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed a leak in QTextDocument::print(). Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent.
| | * Fixed a leak in QTextDocument::print().Trond Kjernåsen2010-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | Also fixed a typo in the QScopedPointer docs. Task-number: QTBUG-10301 Reviewed-by: Kim
* | | Event dispatcher slow down using delays rather than thread prioritymread2010-04-302-37/+95
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Symbian event dispatcher has a mechanism to slow down the Qt app to prevent viewsrv crashes and keep the device responsive. This was implemented using a thread priority drop. But that has some bad side effects, such as app and system performance instability. This new implementation of a slow down mechanism uses a separate low priority thread to test when the system is getting too busy. Adaptive millisecond waits are used to slow the app down just enough to let the low prioirity thread to run. In practice this avoids the performance instability of the previous method, and results in much better system stability where the system stays more responsive with fewer viewsrv panics when heavy Qt apps are running. The slow down code kicks in after 2 seconds of busy time. The delays grow 1ms at a time to a maximum of 1/4 of average event run time. This updated version of the fix used an RSemaphore rather than RFastlock, which should not have been used for cross-thread signalling. Task-number: QTBUG-9489 Reviewed-by: Shane Kearns
* | Revert "Event dispatcher slow down using delays rather than thread priority"Miikka Heikkinen2010-04-292-95/+37
|/ | | | | | | This reverts commit 99dbc23113eaf40f4e311eb0f21092e54676bd10. This commit caused UI to freeze on gui applications on older phones such as 5800XM and N95.