summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix out of bounds use of QVector API.Stephen Kelly2012-04-131-0/+10
| | | | | | | | | | This is a regression introduced by commit d63910575949106f84dacf04abaa14fc866aa66b. Task-number: QTBUG-24965 Task-number: QTBUG-25140 Change-Id: Ice9d90ebb81dcc3c0bc166eeb8f77a0ad9d99476 Reviewed-by: David Faure <faure@kde.org>
* Remove fileLineEndingTest from networkselftest.Miikka Heikkinen2012-04-131-26/+0
| | | | | | | | | | | | | | The fileLineEndingTest case doesn't test network in any way and it is conceptually wrong, too, as any tests where line endings are an issue should be handled with .gitattributes rather than forcing user to check out the repo with unix line endings. Task-number: QTBUG-24271 Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989 Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com> (cherry picked from commit fc8f92106d6743d4165de7d8a440b7e5dbd14391) Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fixes a regression; missing cursor blink when input mask is set.Andreas Aardal Hanssen2012-04-121-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I can't say for sure why q*linecontrol passes an empty rect to the updateNeeded() signal when an input mask is set; presumably the empty rect at some point has meant "full update", but there are a few problems with this. Surely a full update is wrong, even if the semantics have been lost in translation somewhere (likely the qlinecontrol refactoring). This fix ensures that empty rects from updateNeeded() are interpreted as a request to update the whole widget. A further improvement would be to ensure the line control doesn't request a full update when an input mask is set. The cursor is usually wider when a mask is set but because of QLineEdit::paintEvent()'s implementation, there is currently a mismatch between the cursor width as seen by q*linecontrol and what is actually drawn, which causes rendering artifacts if updateNeeded() sends the cursorRect(). Since QLineEdit and Q*LineControl aren't actively developed, it's best to keep this fix minimal, although the performance cost of updating the whole line edit when an input mask is set is unfortunate. cherry-picked from qt5/qtbase a9cda515177db1615f8d47becf2aa781f26955ae Task-number: QTBUG-7174 Change-Id: Ie51e015d760915e07b0220b770f04fc958d93a12 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Make QSslCertificate test fail instead of crashShane Kearns2012-04-101-6/+12
| | | | | | | | | | If the SSL dlls could not be loaded, then QSslCertificate::fromPath will return an empty list. Make the test check for this before triggering an assertion failure by calling first() Task-number: QTBUG-25229 Change-Id: Ib6280c02130142201016a3f15ddb6bd44bfa0f9f Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix QTcpServer::listen() returning true when the port is in use on OS X.Robin Burchell2012-04-031-0/+17
| | | | | | | | | | | | | | | | | | | | | Way back in the mists of time, someone added SO_REUSEPORT to socket binding, which was great, because otherwise it meant that multiple UDP sockets couldn't share the same port on OS X (as platforms with SO_REUSEPORT apparently don't support rebinding with SO_REUSEADDR). However: SO_REUSEPORT also means that *any* bind on a port will succeed, which is most definitely not wanted in the case of TCP sockets, so check the socket type before performing the actual bind. Also test that multiple listens don't take effect. Cherry-picked-from: qtbase/master/a84b42e6194be0f40bd8f961effef9947c07c832 Change-Id: I2f8d450bcfb8a7f3abd8918a4e789a850281dd13 Done-with: Thiago Macieira Done-with: Shane Kearns Task-number: QTBUG-6305 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* test: Mark test as insignificant on MacSergio Ahumada2012-04-031-1/+1
| | | | | | | | This test only fails on Mac at the moment, so enabling it for all other platforms. Change-Id: I7d9ca2152f43e718944c7a0439b633566620795f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Mark test as insignificant on WindowsSergio Ahumada2012-04-031-1/+1
| | | | | | | | This test only fails on Windows at the moment, so enabling it for all the othe platforms. Change-Id: Ic85e321a369104c590f71e45891ddede208383fb Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Memory leak fix of sqlite driver when close failedHonglei Zhang2012-04-031-0/+54
| | | | | | | | | | | | | | If an ongoing query is not finalized before close function is called, sqlite driver can't close the connection to sqlite. In this case, the failure is only reported to the client via getLastError(). Even if the client want to handle this case, there is no easy way to revoke the close function. This commit finalizes all queries before close is called. Task-number: QTBUG-16967 Change-Id: I069f6073bd46f53780e13d269e44aa86366e0574 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix regressions due to partial QSslSocket::peek fixShane Kearns2012-03-301-1/+131
| | | | | | | | | | The fix broke HTTPS transactions with chunked encoding. It also broke use of a QSslSocket in unencrypted mode where peek and read calls are mixed. See change 68b1d5c17aa38d5921bdade2b0e0cb67c6c90513. Change-Id: Ib115b3737b0e4217496f5def10aaaea3c6452ff8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests: Mark unstable test as insignificant on WindowsSergio Ahumada2012-03-302-0/+4
| | | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qhttpnetworkconnection tst_qsharedmemory Task-number: QTQAINFRA-428 Change-Id: I9b4d5490291799c63ff07cb8bc676c37989a7c6b Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* tests: Mark unstable test as insignificant on WindowsSergio Ahumada2012-03-291-1/+1
| | | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qtextstream Task-number: QTQAINFRA-428 Change-Id: Id3b6b7c46d981bb64786c0c225f599784304ca4f Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Fix bug in qsslsocket peek()Kalle Viironen2012-03-191-0/+127
| | | | | | | | | Calling peek() for qsslsocket caused socket data to be copied into qiodevices buffer and therefore make it unaccessible in qsslsocket. Task-number: QTBUG-18498 Change-Id: Ie27a90a468be8158bd8afcd259dbb34483623c36 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix QDeclarativeItem::hasActiveFocus().Andreas Aardal Hanssen2012-03-191-0/+28
| | | | | | | | | | | | | | | | | | This function returns true if the item (or, in case it's a focus scope, one of its children,) has focus (i.e., will receive key events now), or will receive focus once the scene is activated. It also returns true if the item has not yet been added to a scene, but has subFocus, implicating that someone has called setFocus() on it prior to it being added to the scene; the latter case seen most commonly in unit tests. Cherry-picked from qt/qtquick1: bb364c14157df635cf166b293f8cab6c22534aa1 Task number: QTBUG-24681 Change-Id: I2f2d9dd81820e94202a44393a38972c868a774b7 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Harfbuzz-thai - fix buffer overflow when setting item attributesJohn Tapsell2012-03-141-0/+29
| | | | | Change-Id: I19eeb4ec25a7c6cb3f584e6290169f9f327b8713 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Optimise QFile::seek that doesn't move the file pointerShane Kearns2012-03-132-0/+159
| | | | | | | | | If the seek position matches the current file position, then avoid doing an implicit flush that could be expensive. Change-Id: I019858ffb36fe832b9aee8da0a7803cafc8f7f75 Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Improve type detection for query resultsAndy Shaw2012-03-121-0/+118
| | | | | | | | | | | | | | | When an aggregate function is used for a column in a SQL resultset then it should ensure that the right data type is reported for that column. This also concerns expressions when the returned column does not map directly to a table column. Test included for this. Task-number: QTBUG-22038 Change-Id: I681297accc979081d14b44d190ab9d5f83aac215 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> (cherry picked from commit 678ab52ccba0b6a6903e9aee404dbe84fb74c91d)
* Rework QNetworkProxyFactory::systemProxyForQuery autotestShane Kearns2012-03-091-21/+120
| | | | | | | | | | | | | | | | | | Rather than requiring specific hardcoded proxies in the system, it now checks the proxies returned by the system have the required capabilities for the request. Note the test will pass if no proxy is configured (as QNetworkProxy::NoProxy has all required capabilities) The test prints the returned proxy lists and elapsed time diagnostic for manual comparison and debugging. Change-Id: I621ef4d1d7264a98c3e8bd485c30bc1166fcbdf0 Task-number: QTBUG-19454 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 3c529933612ff022d139975d661e37c77b1b2e99) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Windows - fix getsockopt calls for narrower than int optionsShane Kearns2012-03-071-0/+29
| | | | | | | | | | | | | | | | | | | Windows unhelpfully writes to only one byte of the output buffer when getsockopt is called for a boolean option. Therefore we have to zero initialise the int rather than initialising to -1 as was done before. This in general only works for little endian architecture, because the word would look like 0x01000000 on big endian. So I have added some compile time asserts in the assumption that windows is always little endian. This is ok for comparisons with 0/false, but not comparisons with true or nonzero values. Task-number: QTBUG-23488 Change-Id: I3c586d1ada76465fc045a82661f289920c657a4c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> (cherry picked from commit 46e4a9d5231e2d9e35424259858713ca539b8e30)
* Make qget manual test compile without ssl supportShane Kearns2012-03-072-0/+6
| | | | | | Change-Id: I35f92328b79df1cfcae52fa6ff8290f260183aea Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit 3fe79f23a97323521eb0182f8b46b0d0fc9ce44b)
* Bump Qt version to 4.8.1Girish Ramakrishnan2012-03-056-6/+6
| | | | | | | | Change-Id: I117e5dcd45397a9fbd1f033fc745ada00c221721 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Simo Fält <simo.falt@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix sizing in QGraphicsView itemsAtPosition auto testJonathan Liu2012-03-051-0/+1
| | | | | | | | | | The auto test may fail incorrectly depending on the width of the QGraphicsView frame. To ensure more consistent test results, the frame is disabled. Change-Id: I8d70fb07e45803230954f776947d525e4cf9050f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> (cherry picked from commit b2fb578a115f554ec7a00558978e5532a2ac855a)
* tests: Mark unstable test as insignificant on WindowsSergio Ahumada2012-03-051-1/+1
| | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qprocess Task-number: QTQAINFRA-428 Change-Id: Ie7a1e28671f3b7ba709822f724a23aeb70d1ae53 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Harfbuzz-shaper - fix incorrect logClusters being set in HB_OpenTypePositionJohn Tapsell2012-03-041-4/+12
| | | | | | | | | | | | | | After shaping in HB_OpenTypePosition, when we come to calculate the new logClusters array we have to take into account that the glyphs passed in are not a 1 to 1 correspondance with the original string, because some shaping might have already been done. So we must use the old logClusters values (stored in tmpLogClusters) to map from the glyphs passed in back to the original string. This fixes visual word wrapping problems in thai Change-Id: I384dfa98f0946e9e074728f89542acb2b6b6bc27 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QSslCertificate - make lazy initialisation thread safeShane Kearns2012-03-041-1/+62
| | | | | | | | | | | | | | | | | | | QSslCertificate can be copied around into multiple threads, without detaching. For example, the https worker threads inside QNetworkAccessManager. There are const methods, which lazily initialise members of the private class without detaching (i.e. caching results of expensive function calls) These functions now lock the d pointer using QMutexPool to avoid concurrency related crashes. autotest crashes 20% of the time in release builds without the fix, passes 100 times in a row with the fix. Task-number: QTBUG-20452 Change-Id: I64a01af8159216f2dd6215a08669890f6c029ca8 (cherry picked from commit 55bf4ed9468ad467a0b681d2d041edbc2a5a4d21) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Re-enabled passing tests in tst_qvariantJo Asplin2012-03-012-2/+3
| | | | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qvariant test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ibf0dc3caf50d34084fa50cf76d199e77a42f6e16 Reviewed-by: Olivier Goffart <ogoffart@kde.org> (cherry picked from commit e142a64a33a54c433a38d330d64292b7e7698c92) Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add additional QGraphicsView tests for regressionJonathan Liu2012-02-281-0/+61
| | | | | | | | | | Add additional tests for graphics view tooltip regression introduced by 7c0d15a22266a425c9e9ac0120d6774e120fe01e. Task-number: QTBUG-17517 Task-number: QTBUG-22663 Change-Id: I5e0d0e19504730a3e14ac84712a366dbebe688e6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Specify global mouse position for QDeclarativeMouseArea auto testJonathan Liu2012-02-281-3/+4
| | | | | | | | | | The preventContextMenu QDeclarativeMouseArea auto test creates QContextMenuEvent without specifying the global mouse position. As a result, the event's global mouse position is incorrectly set to QCursor::pos(). Change-Id: Ib67fbcf3acf968eb2748426ad0db0e900826b232 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* test: Improved stability of tst_qsharedmemorySergio Ahumada2012-02-281-2/+2
| | | | | | | Significantly increase waitForFinished() timeouts. Change-Id: I498408c756f2b46bf3870f40703e7c2f0d4ec9b5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix tst-qtextscriptengine unit test when no appropriate font existsJohn Tapsell2012-02-241-0/+4
| | | | | | | | The tst_QTextScriptEngine::controlInSyllable_qtbug14204 test fails if no Devanagari font is found. Change-Id: I35cf9d788569a92daa8b370480a44f7e748ddf86 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Stabilize tst_qdbusabstractinterface and make it XFAILRohan McGovern2012-02-231-40/+40
| | | | | | | | | | | | | | | | | | This test was written incorrectly in a way which happened to allow it to pass most of the time (but not all the time). Reset the state of test objects between each test function, and mark the broken functions with QEXPECT_FAIL and a link to a task. Replace the unusual WaitForPinger construct with the usual QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations. (cherry picked from commit e88f9a92b7ab05ea9bc25083de7dee1b67dd673e) Task-number: QTBUG-24262 Change-Id: I7a1f265695c15c0f7b1867a8608827c951a6e3b9 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix handling of urls containing username/password in QNetworkAccessManagerShane Kearns2012-02-201-10/+53
| | | | | | | | | | | | | | | | | | | QNetworkAccessManager was ignoring the supplied credentials, although webkit seems to support these urls at a higher level. Following the behaviour of browsers: We use supplied credentials if authentication is required. We add supplied credentials to the authentication cache. We emit authenticationRequired signal if the credentials were wrong. We do not use previously cached credentials for that url Synchronous http requests fail, if the credentials were wrong. Task-number: QTBUG-18107 Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b4a538ea1c3cdce09e3528227dba2e8f5765cbdc)
* tests: Mark unstable tests as insignificant on WindowsSergio Ahumada2012-02-173-2/+2
| | | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qlocalsocket tst_selftests Task-number: QTQAINFRA-428 Change-Id: I294048133bac141dfd6239dba115dcc93035f868 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Abort FTP download, not the whole applicationShane Kearns2012-02-151-0/+24
| | | | | | | | | | An old coding error meant that the C runtime abort() function was being called instead of QFtp::abort() when cancelling an FTP download using QNetworkReply::close() Task-number: QTBUG-22820 Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix online status checking in generic bearer plugin.Xizhi Zhu2012-02-152-0/+97
| | | | | | | | | | | | | QNetworkInterface::IsUp means the interface is up, but not necessarily connected. QNetworkInterface::IsRunning means the interface is up and connected. Cherry-picked from Qt5 / QtBase commit: c93ac6758606f64af7fe2bac6c8bb08391d218a7 Task-number: QTBUG-22873 Change-Id: Ieb544058814520b4292b496de2e4672214f3d00a Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* tests: Mark unstable tests as insignificant on WindowsSergio Ahumada2012-02-153-0/+6
| | | | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qlocale tst_quuid tst_uic3 Task-number: QTQAINFRA-428 Change-Id: I21e78e4320e28735286778125a103caf7aa45d44 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Checking for directory exists in failed QDir::mkpath on SymbianMurray Read2012-02-151-0/+6
| | | | | | | | | | | | | | QDir::mkpath should return true if the directory already exists. In the new native Symbian implementation, RFs returns KErrPermission denied when you try to access some data caged directories such as C:\private. This was being interpreted as failure, as the code expected KErrAlreadyExists for the case where the directory exists. In this circumstance we now check if the directory already exists. Task-number: ou1cimx1#974477 Change-Id: Ie476219bc963c23d3c7e1773ebded8ecf137fd3c Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* tests: Mark unstable tests as insignificant on WindowsSergio Ahumada2012-02-147-4/+7
| | | | | | | | | | | | | | | | | Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_qdeclarativeerror tst_lupdate tst_qfile tst_qlibrary tst_qtcpserver tst_qxmlquery Task-number: QTQAINFRA-428 Change-Id: I648f86b3ec7767f83767af8981a6ce2aed65722b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Re-enabled tst_LargeFileJo Asplin2012-02-142-1/+3
| | | | | | | | | | | | tst_LargeFile currently seems to pass in a stable way in CI It does have an issue on 64-bit Linux (see QTBUG-21175), so that test function is still disabled (QEXPECT_FAIL'ed) on that platform. Change-Id: I818046f84f2db5eb2155ae1f51f69581029bfaee Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from commit b5ef53df457d784da7221a8244963462a686458d)
* test: Do not mark tst_qdeclarativeerror as insignificant anymoreSergio Ahumada2012-02-131-2/+0
| | | | | | | This test has been stable for quite some time now. Change-Id: I97157c4ccc8221d2ff9f54ee7ed4c66b50956c01 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Added QAccessibleGroupBoxJosé Millán Soto2012-02-101-0/+45
| | | | | | | | | | | | Added a new accessible interface for QGroupBox, as QAccessibleDisplay is not good enough when the QGroupBox is checkable. AccessibleFactory was modified to return a QAccessibleGroupBox when the accessible interface of a QGroupBox is requested. Created tst_QAccessibility::groupBoxTest Change-Id: I6c23dcf5562b3ea269b04102e78463b65827188a Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* test: Do not mark tst_qdeclarativetimer as insignificant anymoreSergio Ahumada2012-02-101-2/+0
| | | | | | | This test has been stable for quite some time now. Change-Id: I485ad4c904db758fa4e594ba0cd883fbe964e525 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Do not mark tst_uic3 as insignificant anymoreSergio Ahumada2012-02-101-2/+0
| | | | | | | This test has been stable for quite some time now. Change-Id: I0a45af35abb263dc4ee9bcab519fda5b313446df Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Mark tst_QMdiSubWindow with insignificant_test on Mac OS XSergio Ahumada2012-02-101-1/+1
| | | | | | | This test only fails on Mac, so enforcing it on Linux. Change-Id: I417a6b4fa76d267232f44009c5b8d2622cbe2f7c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Re-enabled passing test in tst_qdbuspendingcallSergio Ahumada2012-02-101-2/+0
| | | | | | | | | tst_QDBusPendingCall::watcher_waitForFinished_threaded() autotest was fixed by 42004eccf246cbc110f0ad22caa85efeeeb640bb Task-number: QTBUG-20859 Change-Id: Iad3c735e07b3ef21796c3aab1211e18e621ca4d3 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* QTextEngine - treat a fullstop (0x2E) as the same script as the preceeding ↵John Tapsell2012-02-101-6/+43
| | | | | | | | | | | text when dividing up strings Many languages use a fullstop to indicate an abbreviation, making the fullstop part of the word. For languages like thai, it is required to pass the fullstop along for correct word breaking. Change-Id: Ideded63432d06a1ab3b786a7bd13356f2cc1a090 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Harfbuzz-thai: Hide ZWJ and ZWNJ characters and show Inherited charactersJohn Tapsell2012-02-101-0/+42
| | | | | | | | | | | | | | | | | | | | | | Thai is not supposed to have ZWJ and ZWNJ characters or any other of the Inherited Unicode Scripts (http://www.verisigninc.com/assets/idn-inherited-unicode-script.pdf) - they don't have a mapping to the thai encoding tis620 which libthai requires. However it is an unfortunate fact that there are many websites etc that liberally place these ZWJ and ZWNJ characters throughout thai text to force word boundaries, so we must also deal with them. We deal with all Inherited characters by mapping them to the invalid code ~0 in tis620 encoding, following what libthai does internally in its own tis620 encoding functions, and then replacing this character with the original unicode and setting dontPrint to true to hide the ZWJ and ZWNJ characters. Includes a unit test to check the behaviour. Change-Id: I49e44da6e39443daa832e7f50c94804e13deabb4 Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix unstable test due to a race in QThreadBradley T. Hughes2012-02-091-1/+1
| | | | | | | | | | | | | | QThread::finished() is emitted before setting the thread's state to finished and !running, which means it's possible to receive the finished() signal and act on it while QThread::isRunning() still returns true. This test randomly fails due to this race. Fix it by using checking the return value of QThread::wait() instead. Change-Id: Ibf347fc9a2e8d32b328227ee6978e1129dd781f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit faa6113c41b81368c5bbc2a764c2ae9bbc42e415)
* Fix QListView::scrollTo() when there are hidden rowsJani Honkonen2012-02-091-0/+47
| | | | | | | | | | | | | | QListView does not consider hidden rows when scrolling to an item. If there are hidden rows (or columns) before the selected item then the visual index of an item is not the same as the row index from the model. So scrolling will be off by the number of hidden rows before the selected item. Added a autotest for this also. Task-number: QTBUG-21115 Change-Id: I49c39033d83f80d4405b59510617096029ee6d3b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Avoiding early deleteLater in Symbian with better loopLevel trackingMurray Read2012-02-091-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | There have been a number of app crashes where deleteLater has been triggering too early, causing an object to be deleted before it has been finished with. This was happening when deleteLater was issued then Symbian's active scheduler loop was nested. Qt keeps track of loop nesting level to implement deleteLater correctly, but it was only tracking the event loop in processEvents and QEventLoop correctly. The wakeup and timer active objects were assuming they were always run from processEvents and its round robin active scheduler and were adjusting the loop level to account for this. However if they happened to run in another event loop, eg the active scheduler, the loop level adjustment meant that it looked like the event loop was re-running at the same level, which allowed deleteLater to act. The fix is to mark active objects as being run from the RR scheduler, then the wakeup and timer active objects can be tested to see which type of scheduler they are actually running in. With this knowledge, the correct loop level adjustment can be made, and deleteLater runs at the correct time. Task-number: ou1cimx1#947013 Change-Id: Id05cd63ad10e100ea807cc276844aaa36c614351 Reviewed-by: Gareth Stockwell <ext-gareth.stockwell@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Change bugreports.qt.nokia.com -> bugreports.qt-project.orgSergio Ahumada2012-02-094-6/+6
| | | | | | Change-Id: Ib13737eac7f7cee3ebca44aa712cb6b152672a81 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>