Qt's Shift-JIS codec maps the characters 0x5c and 0x7e to unicode yen (0x5a)
and unicode overline (0x203e). ICU and (as it turns out) Symbian's native
Shift-JIS codec preserve 0x5c and 0x7e when converting to Unicode.
Qt's behaviour creates a problem when loading japanese web sites that are
encoded in Shift-JIS. When they reference external JavaScript files, those tend
to inherit the current page encoding (unless the character set is explicitly
specified). Consequently JavaScript tends to contain regular expressions (as a
built-in feature of the language), which in turn uses backslashes for escape
sequences. Therefore it is crucial that the encodings used to decode the script
preserve the ASCII range, i.e. do not convert 0x5c (ascii backslash) to
something else.
This patch corrects the behaviour of Qt's Shift-JIS codec to leave all
characters < 0x80 unaltered in the process of conversion to and from
Unicode.
Task: QTBUG-19335
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
(cherry picked from commit 8e321cd869da7ff1cf0168da41aa0246b44867cc)
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
tst_qhostinfo: Fix IPv6 lookup detection on Windows.
Fix incorrect hardware address on systems without getifaddrs()
Make QHostAddress.toString() follow RFC-5952 for IPv6 address format.
Moved the QTcpServer test to init winsock before we use getaddrinfo.
Reviewed-by: Shane Kearns
(cherry picked from commit 0ccf01368adcabbb25958a55976083f72116a2d5)
The tests include qapplication_p.h, therefore the .pro files need to
specify
QT += core-private gui-private
Change-Id: Icd6d7ba31f79b8c7b15e0327dd5ce44c7f486221
Reviewed-by: Rohan McGovern
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Remove mention of qt3support in makeselftest
Remove Qt3Support test data from lancelot test
Remove Qt3Support code from algorithms autotest
Don't link qt3support lib in QMessageBox autotest
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Remove Qt3Support code from QVariant autotest.
Remove obsolete test data
Remove Qt3Support code from QMenuBar test, part 2.
The data was already commented out and thus unused.
Change-Id: I234cea542bbacf429b6cb1fc0c9feec4f80e47e5
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
qHeapSort and qBubbleSort were Qt3 functions that were replaced by
qSort. During modularization, the Qt3Support header containing these
routines (q3tl.h) was moved into the algorithms autotest, presumably
because that was the only thing that still included the header.
However, as these routines are not part of Qt5, they don't need to be
tested anymore. This commit deletes the q3tl.h header and the test
functions that tested it.
Change-Id: I52eed7b4b4db3bd671dc6dbd752642bc9e783c30
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
This commit removes the four columns of test data that were only used
for testing Qt3Support features.
Change-Id: I93116b64ac49b0d6812595dfd58962ba8afbdad1
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
Remove test data for Qt3Support functions from the QTextStream autotest.
The code that used this data was removed in an earlier commit.
Change-Id: I26e34cdefd47287c6992cf1d31276a40994c607c
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
Follow-up to previous commit: remove the "_noQt3" suffixes on test
function names and the "_Qt4" suffixes on variable names.
Change-Id: I000e87357b025930b0065efc1d0de05c2cd07bba
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
This warning is pointless as the user can anyway check if the color is
valid after making the call by calling isValid(). Using isValidColor()
could be used but it has a big performance overhead as validation then
needs to be done twice.
Task-number: QTBUG-19098
Reviewed-by: Erik Verbruggen
(cherry picked from commit a423ff5474b89028eeca95b254f5184311c8223b)
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Compile IPC tests.
Always call XInitThreads.
Remove redundant #ifdef's from benchmarks
Improve coding style of qdatastream test
Don't use Qt3Support in arthur test suite.
Remove Qt3Support code from QMenuBar autotest
Remove Qt3Support code from QSplitter autotest
Remove Qt3Support code from QSharedPointer autotest
Remove Qt3Support code from QComboBox autotest
Remove Qt3Support test code from accessibility autotest
tests: allow unstable tests to be marked with CONFIG+=insignificant_test
Preprocessor directives that refer to QT_VERSION's less than Qt 5 are
redundant in the qt5 modules.
Change-Id: Id3a9c5f0ba07b72d1c99e51c12a240570bf0d58e
Reviewed-by: Rohan McGovern
Expand literal tabs and format switch statements in accordance with the
Qt Coding Style.
Change-Id: I64e638b730f4be2bc707136b1b7e5585d6808731
Reviewed-by: Rohan McGovern
Note that the functions suffixed with a 3 were actually the Qt4
versions, which is why this patch looks strange.
Change-Id: Iec874153248f57b8696a289cb13eb60fecc5699c
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
This commit removes the second-last column of test data
(labeled testQt3Support) of the insertItem test function.
Change-Id: I2158bdb5a77c9eaf1424998f51fb03a8df934490
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
QWMatrix and QColorGroup were Qt 3 classes and QPalette is substantially
different in Qt 3 and Qt 4.
Change-Id: Iee176fcf237c3f9ac2ffd7f1fd9e4963dc4df39c
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
tests: fixed compilation of tst_qtextstream
QUiLoader, QAbstractFormBuilder: Introduce errorString().
Enable configuration for Xcb
Fall back to using paths for large fonts in drawStaticText()
Add ability to work around non-standard GLES implementations
Fix broken drawing with large fonts using QStaticText and FreeType
Remove Q_ASSERT's from qdbustype autotest
Remove autotest code for Qt3Support library.
Compilation of this autotest was broken by a strange qmake bug,
QTBUG-19393. Work around it by putting a space between two string
literals.
Change-Id: I494c486dd11858eeaf98d7a04021c74fcf3cbba7
In 4.8 we added support for using StringBuilder with QByteArray.
But this is breaking source compatibility for people that used
QT_USE_FAST_OPERATOR_PLUS in Qt 4.7. So we introduce a new macro
Notice that QT_USE_FAST_CONCATENATION was not working without
QT_USE_FAST_OPERATOR_PLUS, so we remove the checking of that macro.
Reviewed-by: joao
(cherry picked from commit 8447f5616be731d78081f326bb9cb3f5aa9087a4)
This commit deals with the simple cases -- mostly just removing blocks
of code enclosed in #ifdef QT3_SUPPORT. Later commits will deal with
the trickier cases.
Change-Id: I280dea25b3754be175efe62fc7e5e4e7c304e658
Task-number: QTBUG-19325
Reviewed-by: Rohan McGovern
This test can't use svg files as QtSvg is a separate module, on which
qtbase does not depend. This commit changes the test to use a pixmap
that was already present in the test.
Change-Id: Iab4ce70aa376a7d2985b69816bd251ce4f5d46cf
Task-number: QTBUG-19244
Reviewed-by: Rohan McGovern
Using Q_ASSERT does nothing in release-mode builds, and in debug builds
it causes tests to terminate prematurely. It is much better to use
QVERIFY or QCOMPARE.
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 3475168550c1a804f04f2a4edfeb30c04cd36551)
Change-Id: Ic39972b685ca35a9a71d9c8d03e8dae31481fb19
Report a fatal error rather than ignoring the error in non-debug builds.
Change-Id: Ib6ef993e6e0c65bd9adea994ea7b454cc147f3d4
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 637456edef085d1825f15429cd921f2f0d4bd6a2)
Rather than aborting in debug builds and failing mysteriously in release
builds, report fatal errors in all builds.
Change-Id: I020b06e19b7ffc8ae4413e1756259f4ca608f253
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit bbfefe1b764cd41b7e677f26621fb6e76a67f9d7)
Report a meaningful fatal error if an unknown token type is encountered
rather than ignoring the error in non-debug builds and reporting an
uninformative message in debug builds.
Change-Id: Id219f3c7cbd4ba3e9875cb81f833720d5d153132
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 1c85fc559ee456a165527d23cb1b7dc237f5504b)
Report fatal errors rather than ignoring them in non-debug builds.
Change-Id: I62dd177e2f391e64c12314bf224f8952ed6f3144
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 4793c3bd1dfddcc98eae12e5caf29ff6aabd31b2)
If populateTestData() would return an invalid model index, report a
meaningful fatal error rather than failing silently in a release build
and aborting with an uninformative error message in a debug build.
Change-Id: I96820429a25ce5c4eb375d50e7e1f672851e26e6
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 984a72a8bbf853059f0eb7e1054538b48d5f3bc8)
Report fatal errors rather than ignoring them in non-debug builds.
Change-Id: Ieafc58f3603fa953f4a963394039e613dcd442fb
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 6e3fcd6ff50e6435fd90629ed695196d25312ffc)
I missed one Q_ASSERT in the previous commit. Also changing to use
Q_FUNC_INFO instead of hard-coded function names in the warning
messages.
Change-Id: I0ff5b2b2cda02597836beb5d2811fa8dd2a344ab
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 74a4aad171b39018d596b99684286b9426a091a5)
Report a fatal error rather than failing silently in non-debug builds.
Change-Id: I625c5aa6f86a5764cd8f078baa074d6475a67736
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit c0c7e04c9248ce38278aceefeb527f29149cfb4e)
The tryWriteLock testfunction didn't do anything useful in non-debug
builds, due to the thread having the important code inside Q_ASSERT's,
which are no-ops in non-debug builds. This commit removes the
Q_ASSERT's, counts the number of failures in the thread and fails the
test if there are any failures recorded.
Change-Id: I4750f66eeba22ab51ba348ebc06704052421f1ae
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 00f724c943b83f10f9ca9475570708536947538e)
Rather than aborting in debug builds and failing silently in release
builds, report a fatal error in all builds if the helper class
methods are called more than once.
Change-Id: Id1fda8dc7caf008bbc8f6ae6384abee1aa8f50eb
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 0c157af3e5aa7c56c53b9eabe1510cc639610969)
Rather than aborting in debug builds and failing silently in release
builds, report a meaningful fatal error in all builds.
Change-Id: I3b874f187d482e9785a839cab1a3855b631404c3
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 844906474dd6905d36003143a03a2fbccf0ad0dd)
Rather than aborting in debug builds and ignoring the failure in release
builds, report a fatal error in all builds.
Change-Id: I1fb8e692c65cf23cf5d2453173db742260ddca48
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 136f39bbb63706819eb18d000f305edbe1cc6a81)
Don't perform actions needed for the test inside Q_ASSERT, because these
actions won't happen in a non-debug build.
Change-Id: I0758e9f29f38c1a83a1501357286877f05beb6c8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit b7d421da6d5e945b74ffbc3a7aa635a6ce63ebda)
Don't perform actions needed for the test inside Q_ASSERT, because these
actions won't happen in a non-debug build. Instead count the number of
failures and verify that the count is zero at the end of the test.
Change-Id: Ibe0d194111e5247118d59a7760f0946d2c44faf9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 8d2127d44e6c8af6b041688376de0e5747a1810a)
Replace Q_ASSERT in helper class with code to count failures and report
meaningful warnings. The test function then fails the test if any
failures were recorded.
Change-Id: I0d6650e6036c8e45729c16d1dbb7543b4fb42553
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 8512dc16553ecf511c40a2ba7a815f777d7d5c59)
Rather than aborting in debug builds and failing silently in release
builds, report a meaningful warning message and return an appropriate
value to indicate the error.
Change-Id: I0ceb0a0bfaef34cc6127d768cc75ecfc5a24e3c9
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 7cb0a3baeb361c9909e8ab2caf436e8e44b6a3b6)
If populateTestData() is passed an unknown type of model, report a
meaningful fatal error rather than failing silently in a release build
and aborting with an uninformative error message in a debug build.
Change-Id: I7ee8d1262bbced304f9f24c2ec9b40a38704d982
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 6b2e89843a573cd7c143bca17cec8e69209d2fbd)
Report a meaningful warning message rather than aborting in a debug
build and failing silently in a release build.
Change-Id: Ic77589143ff0d22c95c7b10f2e511f68b3da4d86
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 75767c69fbba3149a4505287ed441886188a9fd3)
Rather than aborting in debug builds and failing silently in release
builds, report a meaningful warning message and skip setting the
filename, which should cause a subsequent test failure.
Change-Id: I3ae4f4de7b02bf2194019047fa87d8ae06d95634
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit e6f7509f18ae88069373d59073cbdcda88fd19c8)
Rather than aborting in debug builds and ignoring the failures in
release builds, report specific warnings on each failure, count the
failures, and fail the test if the failure counts are non-zero at the
end of the test.
The same change is also made for a QCOMPARE that appeared
inappropriately inside a helper class. QCOMPARE may only appear
directly in a test function.
Change-Id: I81f0ce80512fa72c67f5aa72c0511a4b650d5d20
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 11254ff409395b67cb28453b3c069860bc28c14d)
Report an informative fatal error if passed a null model, rather than
aborting in a debug build and giving a bunch of signal connection errors
in a release build.
Change-Id: Ia240e741b9d6ec03fd5ed3a14cf4fa44b55af911
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 841cc610df61a266ebcca2bfef2542a7d4fea68d)
Report a fatal error in all builds, not just in debug builds.
Change-Id: Ia9e265b2082b55fbac18ca046e586de863ac0623
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 22e99d92a71645d643ebd54c6209bced80f7c5b8)
Rather than aborting in debug builds and ignoring failures in release
builds, report meaningful warnings into the test output and return
sentinel values that will cause QVERIFY/QCOMPARE of the returned values
to fail the test.
Change-Id: I2c5a820637337d0762c71db10a4f270d36b31662
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 524bd6b7120f70a178b03bc6d337e08abd327076)
Convert Q_ASSERT to QCOMPARE and remove mention of Q_ASSERT in comments
to make it easier to check for unwanted Q_ASSERT's in the future.
Change-Id: I7ae250428d4d5682806e724a7207523e65cd9851
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 3290dd0d3563310f6bdbabf74105367bd8c611d3)
These assertions were made obsolete by the previous change to this test.
Change-Id: I3156b273a727f753a6c093c8fc7453b694c777ee
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 57f6ed6664f55ccee62b81750a2b3520249503fd)
Rather than aborting in debug mode and doing nothing in release mode
when the invariant is violated, count the failures and fail the test
gracefully.
Change-Id: Ie193460c478ddde540b6b15aafdce32f471b4b2b
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit f18e0e01468899731bc3777649d69fd6d0041012)
If the test data is incorrect, print a meaningful warning into the test
output.
Change-Id: Ibfe64ef41a0ff3eb47c2385d1c31191334a675a8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 28ccfa472991c0480e67b5f204a567c4023ba6d4)
Report a fatal error in all builds, not just in debug builds.
Change-Id: Iad990e2d3b29a55e995254d466e967a4a722bb23
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit a212b402da4b4af9d453fa96dbfa2d32271e857d)
Rather than aborting on a bad gesture event in debug builds and ignoring
the error in release builds, record a count of bad events and fail the
test if the count is non-zero at the end of the test function.
Change-Id: I6ddd46a5a656185c13eae4bbbb496b986a0c92f6
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 5953d930bc07fa6734a11d053d26a3f80e9c1e89)
Issue a meaningful fatal error in preference to aborting in debug mode
builds and crashing in release mode builds.
Change-Id: I7bb04e1e222fd6167be19b5d88caac27b43d88df
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit cb126ff7ad08e9801e2911511aa9aeb728faa8f3)
If the test data is incorrect, print a meaningful error message into the
test output.
Change-Id: I505a86b4411619d3c3be9541c96c082f92589ff7
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 8e12d9e322ec7d8f7eece09b6f15cba640615f9e)
Report a fatal error in all builds rather than only in debug mode
builds.
Change-Id: I6b3a999dd3ccf00ae66a86b43c125d7082cf0ae5
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit c183540c6c244f327ebd834167799072dcc3b72d)
Report a fatal error in all builds rather than just in debug mode
builds.
Change-Id: Ie54e55ea2dd13bbb12e4265278db832ac1297c28
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 8a1279b0ae180fae94d3da1a4eeb20df5a748d33)
Verify the success of setting the document content in the test function
rather than using Q_ASSERT.
Change-Id: I25e017e7f92803867a998b4f09ad9f717212a9bc
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit d7453aef14b80a5972909ed99f1b4c765b7436a5)
Report a fatal error in all builds rather than aborting in debug mode
builds only.
Change-Id: I53b348f077c6533433e32bbebd159066a2bc2c37
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 4f818b8bcf51cf9c654edbf319d90f6c77a09b3e)
Report a regular test failure rather than aborting when an unknown
operation is requested.
Change-Id: I3678f42f9e9f895d8d0d49a768d4c8b575d1863f
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 22aa68ecec96da4d14a4c9fe2f6e4a337b13b4a3)
Combine the two checking functions (check and checkInvariant) and have
the resulting check function return a bool instead of asserting so that
the test function can QVERIFY and fail gracefully.
Change-Id: Ib069b5424483ba6ffb9caf75036c4f325e9dba51
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit a54900d2227bfb2021c5d1255817824aff11cf32)
This will make it easier to check for stray Q_ASSERT's in the future.
Change-Id: I5ddafe1bf26819566460920deae8ff448008c93f
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit b2db13f245f09f1d14af64d2199284c78cbb5b6e)
If the <dummy> tag can't be found in the data, return an empty string
rather than asserting, so that the test fails gracefully.
Change-Id: I536f08c9c3e942817680849d96d035999d4994db
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit a88dd1c5f62b5ded8ea0d76d185127ef28549c72)
If the test data is incorrect, print a meaningful warning into the test
output instead of deferencing an iterator beyond the last element in
the list.
Change-Id: I7be4f282639453de6d8240a2f17253025b415337
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit f01e2a5024db69913aed016e2854b2589ca85080)
Make the server thread exit early if the socket is invalid. This will
make the test fail gracefully instead of crashing.
Change-Id: Ia9564c94dd32d65e6e9bdb4a2410f1512409546c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit b9b3ced2eafe13e491d5af5ad7432733941bfd8d)
Conflicts:
tests/auto/qsslsocket/tst_qsslsocket.cpp
Report a meaningful warning message into the test output rather than
aborting in debug mode and doing nothing in release mode.
Change-Id: I6883fccbce0139c763f36f6839bb3452d8f69c1c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 5b86c4abc676b36d60e6625e89535e7f4907d2b3)
The Receiver class has two slots that aren't meant to get called during
the test (they're there to catch broken parsing of slot names). Rather
than asserting when one of them gets called, which does nothing in a
release mode build, this commit makes the slots record the number of
times they were called (as for the other slots in the test) and fails
the test gracefully if either of those slots was called.
Change-Id: Ia0393026cb96ffdc6190b5e7bd951f75d231b11e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 7bd6ca895e5fa4de197d9d7bf2e7b578c01c3c2a)
Instead of asserting in debug mode and doing nothing in release mode,
put specific warnings in the test output and fail the test gracefully.
Change-Id: I453a0ab7ddef5b2acf55f77f71a59a940d93ae54
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit a3b2fa3f1beffa7709c11522d4e2db9ec8f952e0)
Issue a helpful warning rather than ignoring the error in release mode
builds.
Change-Id: Iea7bf4d63f8227abaf7dcf1700c5fef62763afad
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 6f082a3fdd368cd7a969b7f324354583d081da82)
Allow createView() to return a null view on failure (which it already
did in release mode builds), but fail the test gracefully instead of
crashing when a null view is returned. Also reordered the code slightly
to put all the QFETCH's together.
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Change-Id: I3a41c738cb0e4e860db2342b30817a804b20f30d
(cherry picked from commit 51b1d8dc20a2557d2002550b03e5b9f37f425fb4)
Allow createModel() to return a null model on failure (which it already
did in release mode builds), but fail the test gracefully instead of
crashing when a null model is returned.
Change-Id: Iaa0ec31183e0c90fcea512223d01e07ed188a380
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 0d773d839e39f4f4bfd0bf9d652e4f2650adfcb0)
Q_ASSERT will only catch a violation of the precondition of the
checkReverseDirection function in a debug build. This commit replaces
the Q_ASSERT with QVERIFY'ing the precondition (that the widget has a
layout) before calling the function.
Change-Id: Ibaa2b52b7d67fa20784e0df022e8c8169da0e50e
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit d1011fc9328fa335bc69a065b29e77ce60608c55)
Sanity-check the test data when using it rather than when creating it.
Change-Id: Ie5d5e1ff3fc439d196096f17cb6f97680927a90c
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 2c64404e2edd3b792b8a1d04c773860d40c04c4c)
Fix regression introduced in 3ca51d87296bcb3098d7de14294fef9294fd5ed4.
The warning is only generated in builds where QT_NO_DEBUG is not
defined *and* the target is not Mac OS X.
Change-Id: I7245f2eab8ea47ab7495fef874b2f8a29186b659
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 60e5ed805af1e11aaec426b823df209b4c895c29)
Make the meaning of the code more obvious and avoid a compiler
warning about the variable "w" being overridden.
Change-Id: Ib76d3aa1cae46e263b2ab61b675d9ef74032aacc
Reviewed-by: Rohan McGovern
(cherry picked from commit 59634e825f1efa6f32befc8767cafedfeb9b7d59)
The function generating data blocks was filling the block to 16 bytes
short of the blockSize, then appending three 8 byte values, causing the
block to grow 8 bytes beyond blockSize and then truncating it back to
blockSize.
This commit makes the code fill the block to 24 bytes short of the
blockSize, so that the block will always end up at the correct size and
truncation is not needed.
Change-Id: I9fe6e6d6cf7bc445513b53e0a910d205c4c8002f
Reviewed-by: Rohan McGovern
(cherry picked from commit b1eb564830ff1b754de14919ce5c1547e9758f7c)
The Q_ASSERT here should really be a QVERIFY. Expanded the trivial
helper function to make it more obvious what the test does.
Change-Id: Ia6017fe820a83b4d6101e5edcfcb68993eef233a
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 6181805f9ea66b37ee164bd67bdac2ac9d53fb65)
The assert and the last four parameters of makeList() are not needed.
The function is always used to make lists of three integers and the data
are all >= 0.
Change-Id: I93ae5a5f541cde2ff61bd9dd21164ed4a9b57403
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit e754832eff8e1a35fc2681ae69b6e3b1ad666ddb)
This code would assert in a debug build and potentially crash in a
release build. (The behaviour of QStringList::at() with an out-of-bounds
index is undefined.) This commit makes the program exit with a useful
error message in all builds.
Change-Id: Ia57a2e5693eb25d3eb0b9ba701ed485dfbc1e846
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 5a530f6171a9569d1a35cd8cd1015ec796b048cc)
If a combobox had no completer, this test would assert in a debug build
and crash in a release build. This commit makes the test report a test
failure and avoid terminating in all builds.
Change-Id: Ib2924412e3d55f10875675cb65079259cd4ef552
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit a5bd4abed834ce3670b2f28d4f932d612a033b36)
Fix regression introduced in 3ca51d87296bcb3098d7de14294fef9294fd5ed4.
The warning is only generated in builds where QT_NO_DEBUG is not
defined.
Change-Id: I9aa3db369094f4046062b5dc1dc694342208ee45
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 67bc4990f7541cca089882a8c3be1b2b8d98cd4c)
Replace obscure failure on bad test data in debug builds with an
informative warning in all builds.
Change-Id: I9001820f34de2f78bf296a2f0e095ce73d9ac4bd
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 34c077faae538adc12d4aa28113640570dfc8728)
Some code in these tests is not intended to be executed, but rather to
detect compiler warnings. Instead of having an obscure fatal error if
this code is run in a debug build, it now has a clear fatal error if run
in any build.
Change-Id: I1c9d27bb14ebf3313865b68e3e57668ba1d14e25
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 70f42ced8e01ddf0098b143e5804c22d55ebf16f)
Only build the autotest when the feature to be tested is in the Qt
build. This is better than building and running an empty test.
Change-Id: I67721f5f48296afcca64f761d12325f8e040f2d8
Reviewed-by: Rohan McGovern
(cherry picked from commit cf911bc0d297ed30e615fd115b0d3ae574cb2412)
Conflicts:
tests/auto/qaccessibility/tst_qaccessibility.cpp
Instead of crashing when we can't get a QAccessibleInterface for a
widget, output a useful warning and return a value that makes the test
fail gracefully.
Change-Id: I0b292cdd8f5a59e26bdc9b0b67cea2b58591df7d
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit d8dc5bfdff25d72e8276c6e80080d72315abe7e0)
Make the test report a useful warning, rather than terminating with an
unintelligible assertion failure, if the GestureState enum is ever
extended.
Change-Id: Ib876a5f2986cbea4e181678a83a72e0d1444f1ee
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit ed5dd84582881bc30a5ce85902b37aae9c243978)
Sort test data alphabetically and remove excess whitespace.
Change-Id: I0e244efca9e9adbe747a375a28a63f70992ef4f8
Reviewed-by: Trust Me
(cherry picked from commit 10f3f270c8a319205590ae13bdeab063d5216441)
This test relies on some API specific to MSVC's debug runtime, which is
not always guaranteed to be available.
Change-Id: Ib0ae4694ad51f59198dadfce802f0dfdf0522002
Reviewed-by: Rohan McGovern
(cherry picked from commit 01dfb9ca25bfaec5784f404dcd4bf41bbc2b6fcb)
Re-enabling for object types that don't crash the test.
Change-Id: I8c2f0d02171c973bf1ede227d4139b52cac5939f
Reviewed-by: Rohan McGovern
(cherry picked from commit 3788a90338e9328710b9d3335a63fb85ab7d97fc)
Fixes warning from tst_maketestselftest about test class name not
matching TARGET.
Change-Id: I7a81d87bb64d2902e842d097248e33eacb388746
Reviewed-by: Rohan McGovern
(cherry picked from commit 069e4441f2e14a82b4ae39601734acb71c909bd9)
Re-enable this test, with the two test functions that fail on Linux
disabled until the failures can be diagnosed.
Change-Id: I915e1a0d675cb71a80086e89f9799a4f9f6b600c
Reviewed-by: Rohan McGovern
(cherry picked from commit ee55dec1efe9c67518bf3e27f81b0696075f7153)
With modularized Qt, using QT_CONFIG is dangerous, because the behavior
changes depending on the order in which modules are qmake'd.
For example, an autotest doing:
contains(QT_CONFIG,svg):QT += svg
...will depend on libQtSvg if (and only if) the autotest is qmake'd
_after_ qtsvg is qmake'd.
This makes the tested functionality unpredictable.
Also, if the above example occurs within qtbase, it causes the test to
sometimes have a circular dependency: if qtsvg is qmake'd before the
test is qmake'd, the test in qtbase depends on qtsvg which depends on
qtbase.
Tests must avoid functionality tests via QT_CONFIG except where all the
tested modules are dependencies of the current module.
Usage of QT_CONFIG with qt3support was entirely removed since Qt5
will not retain qt3support.
Reviewed-by: Jason McDonald
Change-Id: I5a5013b3ec7e1f38fb78864763c9e7586c15e70b
Recursive QMAKE_EXTRA_TARGETS were omitting the `-f' option to make.
This would break in the case where the correct makefile was not named
`Makefile'. The included autotest demonstrates the problem.
Note that this was fixed for normal targets back in 2005
by faac7bd178654fd67a6f3f9cf4f6f2605071448d (p4 202370), but was not
fixed for extra targets.
Reviewed-by: ossi
(cherry picked from commit 96a3bf7a8bbc1e5361e16cbeeceb4be674b88c30)
(It did not really fix the issue.)
This reverts commit 33f525e636ef8fa64a15d3e66c56adaea0075bda.
Conflicts:
src/gui/graphicsview/qgraphicslinearlayout.cpp
tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
(cherry picked from commit fee052e3e37b3335fe563cb8a1881bf59f9e25d0)
* Do not call invalidate from activateRecursive().
This resulted in that a layout was invalidated as many times as there
were items in the layout.
* Several improvements. Do not call resize(size()) too often.
Calling resize() from the widgetEvent() is not very nice though...
* Remove commented out code
* make sure layout is activated even if the widget does not change size
* activate the layout if the resize is same as size()
* In order to not break existing apps, make this an opt-in feature
with QGraphicsLayout::setInstantInvalidatePropagation(true);
Reviewed-by: Frederik Gladhorn
Reviewed-by: John Tapsell
Make sure the resulting image / pixmap is valid if the source was valid.
Task-number: QTBUG-19157
Reviewed-by: Kim
Reviewed-by: Benjamin Poulain
(cherry picked from commit 1c5da7207a21cc44a4a08d291c290ffcd9b958fd)
Older commit history is in KDE svn:
http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log
Ammended to update the license headers.
Merge-request: 900
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Conflicts:
doc/src/frameworks-technologies/model-view-programming.qdoc
tests/auto/headers/tst_headers.cpp
(cherry picked from b00089261eafbdf5f92ed94d7fb20b402bfcaeb2)
Widgets are left in a transitional (and incosistent) state while being
re-parented, which caused QWidget::effectiveWinId() to crash in certain
circumstances. See patch for more details.
Auto test included.
Reviewed-by: ogoffart
(cherry picked from commit 6db0153cd7e35e4a919a76ae2aadbf2d2510bfb7)
select code for open C file/socket descriptors was crashing in FD_SET
if a QSocketNotifier was created with an invalid descriptor.
Added two autotests to QSocketNotifier, one to check notifiers with
bogus socket descriptors don't crash, the other to check that notifiers
with posix socket descriptors do work. (symbian socket engine doesn't
use them so they are not implicitly tested)
Reviewed-by: mread
Task-Number: QTBUG-18138
(cherry picked from commit 8a9a6afcf02f089f932bc81431ab46a60af32134)
Ignore warning when the test intentionally sets an invalid socket descriptor.
Make sure to set content type on all http post tests in tst_qnetworkreply.
Run test with enough capabilities to avoid platsec errors when accessing
certificate store.
Reviewed-By: Markus Goetz
(cherry picked from commit 9632fdefa9012ca11cd1345d66bafd6f417de88e)
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Fix tst_QVariant::invalidColor
Move QTextCursor::MoveStyle to Qt namespace
Add some QRawFont related low level functions to avoid extra copying
Since a423ff5474b89028eeca95b254f5184311c8223b, the warning message is
no longer produced.
Reviewed-by: Samuel Rødal
(cherry picked from commit 8a5e82732be3aac37d14ef85c6974add46c6b65f)
We cannot use QTextCursor::MoveStyle enums in QTextLine because
QTextCursor is not a QObject, while referring to that enum in
Q_PROPERTY requires it to be. That's why we need to move the
enums in Qt namespace.
Reviewed-by: David Boddie
(cherry picked from commit 5eba82b752e85a5d6cb3a893214ed2646d75f362)
tst_lancelot did QT+=svg, but didn't actually use QtSvg.
qlocalsocket/lackey uses QtScript, which is not available when compiling
qtbase.
Change-Id: Ic3cc5a6f74a58ee8f2fdc48b9c852d9551b85f68
Any test which needs private headers from some Qt module must do:
QT += modulename-private
Reviewed-by: Jason McDonald
Change-Id: I6924a577a960e4990f4379b02bca4822d8248fb4
These autotests are all using private symbols, available only when Qt is
configured with -developer-build. So, gracefully disable them when
the private symbols are not available.
Reviewed-by: Jason McDonald
Change-Id: Iafd1c7af486feeee810110bc021e75984827f78a
Now the texts used for undo actions and for items in QUndoView can
be set separately. This introduces an extended format of text that
can be passed to QUndoCommand::setText or QUndoCommand constructor.
The action text can now contain two strings separated by a "\n". The
first string (that goes before "\n") is then returned by
QUndoCommand::text() and used as name of item in QUndoView.
The second string (that goes after "\n") is returned by
QUndoCommand::actionText() and used when the text properties of the
undo and redo actions are updated.
If the text passed to QUndoCommand does not contain "\n", everything
works as before, and both QUndoCommand::text() and
QUndoCommand::actionText() return the same string.
Even though action text in English usually does not need different forms
for undo actions and QUndoView item, translators can employ this new
command text format, for example to adjust the grammatical case used in
command text to match the context of "Undo %1"/"Redo %1".
Merge-request: 2610
Reviewed-by: ossi
(cherry picked from commit 9b784789c75d59b27530bbf1d12676cc44f64f46)
Functions QUndo{Group,Stack}::create{Undo,Redo}Action() now use action
text templates "Undo %1" and "Redo %1" if no custom prefix was provided.
This makes more flexible translations possible. The surrounding text
(like "Undo" and "Redo") can now be suffixed to the command name as
German and Korean languages require ("%1 rueckgaengig machen" for German).
Also, now the default action text (when no command can be undone) can be
translated differently from the prefix. For example, it can be
translated as "Undo action", not just "Undo".
When a non-empty prefix is passed to QUndo*****::create****Action(),
those functions work as before, and the features described above become
unavailable.
Task-number: QTBUG-14442
Merge-request: 1212
Reviewed-by: ossi
(cherry picked from commit 213c25ad24e4f3b0a44f82f23d34746cd294f8d6)
This case may be triggered in the (admittedly slightly abnormal) case where a
user wishes to embed the calendar widget in a layout or, for whatever reason, do
something else that will change its ownership.
We work around this by detecting when it is deleted and recreating the widget.
This will also have a positive side effect if setCalendarWidget() is called with
a widget which is then subsequently deleted, returning the default widget
instead of a pointer to (now deleted) memory.
Reviewed-by: Denis Dzyubenko
Merge-request: 2568
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit 124ec3200f8453142717fcfe7a4aa0a55164aaa6)
while windows itself does not care which case the variable names are in,
they may be passed to unix tools which *do* care.
note that this uses true case folding for string comparisons while
windows uses uppercasing. this means that "ess" and "eß" will be
considered the same by us, while not by windows. this is not expected to
have real-world impact, particularly because non-ascii variable names
are not used much.
Task-number: QTCREATORBUG-3110
Reviewed-by: thiago
Reviewed-by: dt
(cherry picked from commit f3db5603871928ebed43a085a496397e65952b39)
The test case freed the wrong pointer, causing crash in Symbian devices.
Task-number: QTBUG-17489
Reviewed-by: Janne Koskinen
(cherry picked from commit 02bb8e4c5f4584f3c0a7ed16bcba20c7f43456cd)
For some reason this test is sometimes giving false results
with intel compilers.
The child count is most likely style dependent.
For now ignore it in the test.
Reviewed-by: Thierry
(cherry picked from commit 0ddecd383c91afb18ce2776eed5608bb1a0c2129)
This reverts commits 0916a68056154ecb60e4ea2c79726ab2e49b1532 and
6f1384fcbeea993d5be47590c696de60215b7608.
This effectively reverts most of MR 694.
Reviewed-by: Olivier
(cherry picked from commit 06e104b9c305d3db0dd1848e6e633ee3888fd1de)
When using QtextCursor::insert() with a large text followed by setting
the vertical scrollbar to its maximum value (scroll to bottom),
QPlainTextEdit would not behave properly if a document size
change was triggered by the insertion due to line wrapping.
This was visible in Qt Creator.
Auto test included.
Reviewed-by: con
(cherry picked from commit 5d144faf3c524ab557b88f69c4b755e20237e846)
QWS defines GRADIENT_STOPTABLE_SIZE to be 256, which is not enough
resolution for this test to pass.
Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 0201d5f5a8c95bd4f6b94726ed0db2b83cd3efc7)
We need to loosen the requirements a bit when qreal is float... Just
skip the two failing test cases for now.
Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 3c659eb590aecbcdb40cb498901e757e780fa892)
The extended radial gradients conform to the radial gradient
specification in HTML 5 canvas.
Task-number: QTBUG-14075
Reviewed-by: Andreas Kling
(cherry picked from commit da55c1ea92474e989e5582b02815936bbf584405)
Two stops is a fairly common case so we gain quite a bit by special
casing it. Improves performance by 10 % in parcycle benchmark, and
by 90 % in a synthetic benchmark.
Reviewed-by: Andreas Kling
(cherry picked from commit 5b74a70ac630073582be56f8a0539624a1080185)
Add support for QDir::NoDot and QDir::NoDotDot for setFilter in
QFileSystemModel.
Task-number: QTBUG-14760
Reviewed-by: Frederik
(cherry picked from commit b60d82fd56897b1a1d3cc730172f71c27a497ede)
navigate would not return the right index in the parent if the current
widget was not the visible one.
Reviewed-by: Jan-Arve
(cherry picked from commit fdeeaa9d61efea9cca783a1d4098ae505df24390)
Return Check/Uncheck for checkable buttons.
Partially revive the buttons unit test.
Reviewed-by: Jan-Arve
(cherry picked from commit 6040eeebfb1ab3be3906295c373033cd5b5d9dc3)
Return app name instead of window title for root accessibility object.
Return Window as accessible type for the main window.
Reviewed-by: Jan-Arve
(cherry picked from commit 9a5b0d7a579572cd7e7faf869ab1a6684800f592)
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Merge-request: 980
(cherry picked from commit e3cd651d92a9e550fe52360d1be6ae41d0f2ab85)
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
Add internal documentation for QUnifiedToolbarSurface.
Fix the autotest condition.
Change the repaint() call to an update().
Fix the update() autotest for raster.
Change the repaint() to an update().
Set the default graphics system to raster.
Revert "Switch the default graphics system to raster on Mac."
Fix an race condition in the auto test.
Fix an race condition in the auto test.
Fix a race condition when the main window is being destructed.
Switch the default graphics system to raster on Mac.
The previous preprocessor directive was aimed to
exclude Mac OS X.
With the raster engine, the behavior is unified
and we don't need to have a separate path for
Mac OS X/Cocoa.
The new condition excludes only Mac OS X with a
graphics system other than raster or Carbon.
Reviewed-by: Jiang Jiang
(cherry picked from commit 2c6af885d959f90b801c74dc5d389a720dc9fd1d)
With the CoreGraphics engine, we expect the test
to fail with update(), but with the raster
engine the behavior is the same across platforms.
Hence we don't need a special case for Mac OS X
with the raster engine.
Reviewed-by: Samuel Rødal
(cherry picked from commit 75d2387fbf005b022437855ab6433790372639f8)
Deleting the page in the wizard without removing it
first leads to a crash when the wizard tries to
access a deleted page.
Reviewed-by: Samuel Rødal
(cherry picked from commit 4024a08239c3e69bb2e0ca045ccbdf3fc900f675)
Deleting the page in the wizard without removing it
first leads to a crash when the wizard tries to
access a deleted page.
Reviewed-by: jasplin
(cherry picked from commit 3bff1637cd49617d334c1be63c20e008fac93be1)
Fix a bug in QVector::append(), it should use the capacity for new size,
when it is implicit shared and capacity is bigger than the new size.
Autotest included.
Task-number: QTBUG-11763
Reviewed-by: joao
Reviewed-by: Olivier Goffart
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
Skip test on MacOS due to problems with corewlan plugin
Fix QNetworkConfigurationManager usage outside main thread first
Update QTBUG-17223 for Qt 4.8
fix tst_qnetworkreply::httpProxyCommands autotest
Send User-Agent from the network request in http proxy CONNECT command
Add autotests for configuration dependent network proxies
Fix QNetworkReplyImpl error handling
Enable per network configuration proxy settings in QNetworkAccessManager
Allow a network configuration to be included in a proxy query
Fix error handling in write for socks socket engine
QNetworkConfigurationManager creates the engines loaded from plugins
as objects in the main thread.
If a QNetworkConfigurationManager instance is created in a worker thread
without any instance previously existing in the main thread, then it
is uninitialised until the main thread has run.
This causes allConfigurations() to return an empty list if called
immediately after instantiation, for example.
This fix initialises the plugins using blocking queued connections,
which causes the worker thread to block until the initialisation function
has been called in the context of the main thread.
Deadlock is possible if the main thread is for some reason waiting on the
worker thread, but it will not deadlock on QNetworkConfigurationManager's
mutex.
If this is a problem for an application, it should use
QNetworkConfigurationManager from the main thread first to preload the
plugins.
Task-number: QTBUG-18795
Task-number: QTBUG-18799
Reviewed-by: Cristiano Di Flora
Due to architecture changes in Qt 4.8, clearing the proxy before the
request is complete causes the http connection to not use any proxy.
The issue is that the proxy isn't resolved until after the bearer has
been started (which is correct in the general case, as system proxy
is unknown until that time).
Also increased the test's timeout from 1 second to 15, as starting a
bearer can be slow.
Reviewed-by: Markus Goetz
Some proxies can discriminate based on the User-Agent when sent a
CONNECT command for establishing a HTTPS connection.
With this change, if the User-Agent header is set in the QNetworkRequest
then it will be passed to the http socket engine for use in the connect
command sent to the proxy.
As before, "Mozilla/5.0" will be used by default when no user agent
has been set.
Task-number: QTBUG-17223
Reviewed-by: Markus Goetz
1. test that systemProxyForQuery returns something for all configs
2. test that QNetworkAccessManager uses the settings for the
configuration it was started with.
Task-number: QTBUG-18618
Reviewed-by: Peter Hartmann
When refactoring the setPixelSize() code of QRawFont, it was broken
on Mac. To avoid making the same mistake again, I've added a simple
autotest to check that the pixel size is actually set.
Reviewed-by: Jiang Jiang
(cherry picked from commit 821b8b540af491ce60d35bd84d3c91399ecc0d16)
The comment was copy-pasted, spelling error and all, from the example
in the bug report, and really doesn't make any sense at all in this
context.
Reviewed-by: TrustMe
(cherry picked from commit 7ac511d8d906575dff1a02361e31251b244d3b3a)
The header field "Cache-Control: must-revalidate" is a strict
requirement for loading the resource from the server, and not reading it
from the cache without revalidating first. With this patch, PreferCache
will load such from the network instead of loading them from the cache,
and AlwaysCache will throw a ContentNotFound error.
Reviewed-by: Markus Goetz
Task-number: QTBUG-18983
We should follow
http://tools.ietf.org/html/draft-ietf-httpstate-cookie-23 , which says
parse the value until reaching the next ';' or the end of the line.
Other cookie implementations allow spaces in unquoted values as well.
Reviewed-by: Martin Petersson
Task-number: QTBUG-18876
When you copy-pasted rich text in which the font size had been set
using setPixelSize() the font size would be mysteriously forgotten.
The pixel size property in QTextCharFormat was added ad hoc, and not
integrated in the HTML exporter.
Task-number: QT-4792
Reviewed-by: Gunnar
(cherry picked from commit 5aa5c2e2935c1829cc6965198968699f17c24ec0)
The pixel size in the font engines is already a floating point value.
For maximum flexibility, we should expose this in the public API.
Task-number: QTBUG-18817
Reviewed-by: Jiang Jiang
(cherry picked from commit ac9e63b58533a3215106ed9da82cff3a3e3dda3a)
If the text is wrapped with LRE/LRO/RLE/RLO override/embed marks,
Core Text in Mac OS X 10.5 doesn't produce an empty glyph at the
beginning of the glyphs (while it does in Mac OS X 10.6), thus
we need to prepend an empty glyph here, otherwise cursor position
calculation will consider the first two characters as a ligature
of the same glyph.
Reviewed-by: Eskil
(cherry picked from commit a36ac6c34bafa801c2c30d76f59e4a3594efc4d5)
Bidi input can in some contexts be more intuitive if the cursor
works in visual way: pressing left arrow key always make cursor
move one character to the left regardless the language of text,
pressing right arrow key always make cursor move to the right.
It is also the behavior of Mac OS X. Based on the above reason
and requests from Symbian we implemented this support for visual
movement in BIDI text. 3 public properties are added to
QTextDocument, QTextLayout and QLineEdit respectively:
- QTextDocument::defaultCursorMoveStyle can be used to control
the cursor behavior in all widgets based on QTextDocument,
like QTextEdit, QPlainTextEdit, etc. When set to QTextCursor::
Visual, it will enable visual movement for all the cursors in
the corresponding text edit. Default is QTextCursor::Logical.
- QTextLayout::cursorMoveStyle is used for low-level cursor
manipulation. When set to Visual, it will enable visual movement
behavior for all the cursor related methods, including cursorToX,
xToCursor and drawCursor. Default is Logical.
- QLineEdit::cursorMoveStyle is used to control cursor movement
behavior in QLineEdit. Default is Logical.:
Task-number: QTBUG-13859
Reviewed-by: Eskil
(cherry picked from commit c480dd641f5d22d1ee72cb27bf39e24c6df65658)
When modularized, the benchmark test case might not have access
to the JavaScriptCore source code. So, make sure the test case
still compiles in this case.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://qt.gitorious.org/qt/pages/GitIntroductionWithQt
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12