Commit Graph

2032 Commits

Author SHA1 Message Date
Bjørn Erik Nilsen
3803111692 Cocoa platform plugin: Reduce multitouch area to be one pixel.
Mac only support multitouch points, hence width/height 1. Also add
comment about performance related to multitouch events.

Change-Id: I307261492366e361e17f9edf446f456c07c87a22
Reviewed-on: http://codereview.qt-project.org/5162
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
2011-09-19 18:56:32 +02:00
Eskil Abrahamsen Blomfeldt
4a34b671f8 Fix regression causing synthesized oblique glyphs to clip
In 20009ed797 I introduced a new
approach to synthesized oblique. However, while the embolden
function in FT alters the glyph metrics accordingly, the
oblique function does not, so the glyphs would be clipped to the
original, unslanted metrics. So I've implemented the same matrix
in the loadGlyph() function and we now apply this to the metrics
manually. This will only work as long as the underlying algorithm
doesn't change significantly.

Task-number: QTBUG-21202
Change-Id: Ic20b2a0fdeac5ce833e95fd06efa12b3b70feee5
Reviewed-on: http://codereview.qt-project.org/5156
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-09-19 16:37:51 +02:00
Bjørn Erik Nilsen
6e1f1df625 Cocoa platform plugin: update headers for multitouch.
See commit: b888bf1b515b47bc12dfaeac06f33af762ce0372
(Moved multitouch code from gui/widgets/ to plugins/platforms/cocoa)

Change-Id: I7c71f4d858cba4918392d477c6597b48e271ea99
Reviewed-on: http://codereview.qt-project.org/5154
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-09-19 16:37:51 +02:00
Bjørn Erik Nilsen
dc91f2f29b Cocoa platform plugin: Implement multitouch support.
Change-Id: Ic4b5bc4e48bd1e70cffedf15530b8a933037de66
Reviewed-on: http://codereview.qt-project.org/5153
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-09-19 16:37:51 +02:00
Bjørn Erik Nilsen
a201004830 Mac: Adapt multitouch code for cocoa to QWindowSystemInterface.
Change-Id: I4a80ed8a497dfb1b8b477e4a40ec91a16f1bb541
Reviewed-on: http://codereview.qt-project.org/5152
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-09-19 16:37:51 +02:00
Bjørn Erik Nilsen
9d7e365918 Mac: Move multitouch support from widgets to cocoa platform plugin.
Change-Id: I91994801aefa1257e7bda51b409290f70ab9128e
Reviewed-on: http://codereview.qt-project.org/5151
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-09-19 16:37:51 +02:00
Samuel Rødal
003060e292 Make sure to clip in QXcbBackingStore::flush()
Clip to image and window dimensions to prevent X errors.

Change-Id: I7fa581217444e00d6eb83ac356c600f86ae03636
Reviewed-on: http://codereview.qt-project.org/5140
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
2011-09-19 16:37:51 +02:00
Kai Koehne
9a096d9eb0 Move handling of -qmljsdebugger argument to QCoreApplication
Move handling of -qmljsdebugger= argument from QApplication
to QCoreApplication. It makes sense to allow debugging also
for applications based on QCoreApplication (which we intend
to support in QtDeclarative).

Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36
Reviewed-on: http://codereview.qt-project.org/5121
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-09-19 16:37:51 +02:00
Holger Ihrig
86ad092dff Removing XFail from one test, since QCursor::setPos now works for qpa
Task-number: QTBUG-20753

Change-Id: I0e381f22f6d94c5991ac3425f75e682708857aa2
Reviewed-on: http://codereview.qt-project.org/5139
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-19 14:18:35 +02:00
Jan-Arve Saether
df5111165e Say hello to QWindow::accessibleRoot()
Change-Id: I1efa71f01f8af46c9addf2aae21e4b6fc086ad2e
Reviewed-on: http://codereview.qt-project.org/5087
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-09-19 12:06:13 +02:00
Frederik Gladhorn
76d0d19264 Add parent and child functions to QAccessibleInterface.
Stop the mis-use of navigate to find the parent.
In order to make navigation straight forward
parent and child functions are now part of
QAccessibleInterface.
This allows navigating the hierarchy of
accessible objects without the 1-based indexes in the
navigate function which lead to confusion.

Eventually the support for Ancestor in navigate can be completely removed
and forwarded in the windows bridge if needed.

In addition default parameters for virtual children.
This will make the transition smooth since it allows to remove the integer
already.

Change-Id: I278287ce17161f9fa46797ac244676778c859576
Reviewed-on: http://codereview.qt-project.org/5024
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-19 12:06:13 +02:00
Gunnar Sletta
3647a00d47 Initialize in the right order
Change-Id: I605c92bb43ea304cc812f85dc9937c161b2279f6
Reviewed-on: http://codereview.qt-project.org/5120
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-19 12:06:13 +02:00
Kent Hansen
b8d656d878 Fix autotest gui/widgets dependencies
This is in preparation of removing testlib's
dependency on QtGui and QtWidgets.

Autotests that need QtWidgets api must
explicitly include it (since the types are no
longer provided by the QtGui master header).

Autotests that don't need QtGui or QtWidgets
api shouldn't link against those libraries.

Change-Id: I2808289068514fcac582808828ad4634e2631733
Reviewed-on: http://codereview.qt-project.org/5093
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-19 10:24:25 +02:00
Holger Ihrig
39a6ff81bc Removed insignificant_test from tst_v8
Problem was fixed by Change Ie172e935: Revert accidental v8 submodule version downgrade

Change-Id: Ie0467170df70e9fcc10837150103d48ddd48734b
Reviewed-on: http://codereview.qt-project.org/5006
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-19 10:24:25 +02:00
Casper van Donderen
cd621c201c Move the module qdoc files from qtdoc and split up doc/src.
Change-Id: I7d992889379d78e07a0b7023facebd7421cf6d22
Reviewed-on: http://codereview.qt-project.org/5092
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2011-09-19 10:24:25 +02:00
Eskil Abrahamsen Blomfeldt
20009ed797 Support synthesized oblique and bold in SceneGraph
When fetching the outlines we need to synthesize the weight and
style of the requested font. This is currently only supported
on FreeType versions that have the Embolden and Oblique functions.
We also use FreeType's Oblique function for regular text when
possible, and only use the matrix approach when that function
is unavailable.

Task-number: QTBUG-21202
Change-Id: I0656ab66cc3ec70d6a7675b8c78d06632625261c
Reviewed-on: http://codereview.qt-project.org/5076
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-09-19 10:24:25 +02:00
Eskil Abrahamsen Blomfeldt
76e56fc449 Enable glyph caching on QPA
The glyph caching was disabled on QPA, possibly due to some
bugs which have gone away now. To avoid the performance hit
of this, we need to enable it. Simple tests of QTextEdit
indicate that this works fine.

Change-Id: I40845b327331b366161f1ca55bf00853bca87358
Reviewed-on: http://codereview.qt-project.org/5096
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-19 10:24:25 +02:00
Kent Hansen
d00017b842 Remove gui-related ifdef from testlib/qbenchmark.cpp
It didn't make sense, since testlib doesn't link against
gui. The QApplication api wasn't used anywhere anyway.

Change-Id: Idb1bd20c7bcd0f9f16a9b526a7dabe4afccecfc4
Reviewed-on: http://codereview.qt-project.org/5058
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-09-19 08:43:01 +02:00
Jiang Jiang
1aaf08691d Treat QTestFontEngine properly
Do not try to fill fontDef when it's a test font engine, otherwise
it will cause a crash because desc.family is 0.

Change-Id: I008b784bae3e60a25c33c285d944442a3616a9a2
Reviewed-on: http://codereview.qt-project.org/5103
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-09-19 08:38:17 +02:00
Samuel Rødal
e63b6f113c Fixed xcb-render config test.
Change-Id: I5f9f2beb57a2bc6b4e44dcd71a03cfdcf69cae45
Reviewed-on: http://codereview.qt-project.org/5086
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-09-19 08:37:40 +02:00
Lars Knoll
98baa289cc Fix the test case
If the MKSPEC we get is an absolute path, we should
pass that one on to qmake. Otherwise it'll try to
find the mkspec in the install location. This fails
as 'make check' is being run before installation.

Task-number: QTBUG-21402
Change-Id: Ie872546f2ee7c5d737e50a1779637e393538ccc2
Reviewed-on: http://codereview.qt-project.org/4999
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-17 07:36:26 +02:00
Matthew Cattell
e2ea8e958c correctly initialise private data in QTouchEventSequence constructor
Change-Id: Ia43ab0af4dfbaa824e76f744030e98f29e898bac
Reviewed-on: http://codereview.qt-project.org/4973
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
2011-09-17 07:35:36 +02:00
Jiang Jiang
80ac315ded Make sure libQtPlatformSupport has proper flags
If we don't have Q_FONTCONFIGDATABASE flag, QGenericFontDatabase
will be defined to QBasicUnixFontDatabase even when fontconfig is
available.

Change-Id: I0e79ed8488163cea32352e3fc300acd92ca4bd93
Reviewed-on: http://codereview.qt-project.org/4962
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-17 07:35:23 +02:00
Jason McDonald
a021f26148 Simplify selftest
Don't store separate strings for the logger name and the associated file
suffix -- just use the same string everywhere.

Change-Id: Ie7d1af6bf906b5ac09fbd5fcc5754b68036fb370
Reviewed-on: http://codereview.qt-project.org/5060
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:22:48 +02:00
Jason McDonald
8a12d5fbf0 Improve cleanup of selftests
The selftest was only attempting to delete the output file at the end of
the entire test run.  This file should actually be deleted after each
subtest to ensure that it does not cause confusing errors if the next
subtest fails to overwrite the output file.

Change-Id: Ia3827926f71a697c6108de3f2b08c969f761d978
Reviewed-on: http://codereview.qt-project.org/5051
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:22:18 +02:00
Jason McDonald
89c7db5159 Remove obsolete QEXPECT_FAIL calls
The removed calls related to tests that were removed when redundant
logging functionality was removed.

Change-Id: Iaebbc109eaaddb440ae78e1f4a1b4e874a8b2960
Reviewed-on: http://codereview.qt-project.org/5050
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:22:10 +02:00
Jason McDonald
218f0ca3b0 Improve compliance with Qt coding guidelines
* Use C++ comment delimiters consistently
* Use a space after control flow keywords
* Don't nest "else if" blocks unnecessarily
* Follow indenting rules
* Added comments describing some internal functions

Change-Id: I72fd1eaf5c5f3130945fbd2b64fa59e19ad2913d
Reviewed-on: http://codereview.qt-project.org/5049
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:21:59 +02:00
Jason McDonald
0676e51793 Fix XFAIL in testlib selftest
Commit 949be8cbdd modified the assert test
case but failed to update the line number of the assert in the expected
test output files.

Change-Id: I0d4f55c0b8bc1de8487dd8c6267aa459000cda26
Reviewed-on: http://codereview.qt-project.org/5048
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-09-17 03:21:44 +02:00
Konstantin Ritt
1efd2de047 minor docu fixes
Merge-request: 2646
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit 2fa6d410c6733863b19393c13efbdcb7efd59fc0)

Change-Id: Ic66de960c5ec63a669b164ebf6fadcc4f59295f6
Reviewed-on: http://codereview.qt-project.org/5033
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2011-09-17 03:21:32 +02:00
João Abecasis
0d4834c171 Wrap calls to Sequence::push_back
In C++11 push_back is overloaded to support rvalue-references,

   void std::vector<T>::push_back(const T &);
   void std::vector<T>::push_back(T &&);

so attempting to get the address for push_back is ambiguous.

Instead of hardcoding the function signature, the better and more
general solution is to allow the compiler to do the required overload
resolution itself, also allowing for implicit conversions to take place.

Task-number: QTBUG-18996
Done-with: Liang Qi
Reviewed-by: Olivier Goffart
(cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408)

Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552
Reviewed-on: http://codereview.qt-project.org/4642
Reviewed-by: Liang Qi <liang.qi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-17 03:21:15 +02:00
Lars Knoll
a13b17e42a Compile in C++0x mode
Change-Id: If97bdd94a51756e48167990a4014ba1059d0a507
Reviewed-on: http://codereview.qt-project.org/5026
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-17 03:21:06 +02:00
Samuel Rødal
884251cdc1 Fixed XComposite hardware integration in wayland plugin.
We should set both the pixmap and window bits for XComposite to work on
a stricter EGL / GLX implementation.

Change-Id: Ie1be44ebcc68fed87f48c74dffd887ffae1189d5
Reviewed-on: http://codereview.qt-project.org/4893
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-09-17 03:20:55 +02:00
Samuel Rødal
3061050b7f Set the correct buffer pointer (protected member variables are evil).
Change-Id: I6cdd64fbee5a9b46b44d8fadfc0f443dd1f4b140
Reviewed-on: http://codereview.qt-project.org/4862
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-09-17 03:20:37 +02:00
Jiang Jiang
c298b0b153 Fix trailing spaces problem by not adding it to QScriptLine.length
It seems to be the only sane way to fix it. Previous attempts to
fix it by compensating the trailing space width all failed in some
cases, one of the trickiest is when we are having embedded LTR text
that has trailing spaces in a RTL paragraph.

In this patch we leave line.length not including the trailing space
length, but saving it to a separated variable, so that we can always
add it back when needed (QTextLine::textLength() for instance).

It fixed all the problems in different alignments of both RTL and
LTR text. And no regression is found yet.

Reviewed-by: Eskil
(cherry picked from commit 80294c375eca9687d1c34e9ab048294373e7f00c)

Change-Id: Id248ab6f54f8cc25ba0e9d1626703463dfefbcea
Reviewed-on: http://codereview.qt-project.org/4778
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-17 03:20:28 +02:00
Jiang Jiang
8dcb52df8e Avoid fontconfig access in fontEngine creation
The only thing we need to know at fontEngine creation is the hinting
style, we can just store it in enumeration process and get it back
from user data pointer. So that fontEngines can be created without
access to fontconfig at all. (Since we are doing our own matching.)

Change-Id: I5ab2d1f27e28787447aedcbdef16555fb0f1b604
Reviewed-on: http://codereview.qt-project.org/4769
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-09-17 03:20:18 +02:00
Rohan McGovern
81a5885814 Mac: fix linking with Qt frameworks which don't exist at qmake time
This restores the forced-vs-detection logic for Qt frameworks which
was removed by commit ceed409b40.

The problem of linking against Qt modules compiled as a static
library is solved a different way: the module must explicitly state
in the module .pri file that it is built as a static lib.

Change-Id: Ie3d726f7b3933e5b5d27f15c6112ec1c7dee1ea2
Reviewed-on: http://codereview.qt-project.org/5034
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-09-17 01:32:51 +02:00
Holger Ihrig
fb59d866c2 Fixed Test for QStyleSheetStyle after refactor merge
Task-number: QTBUG-21468

Change-Id: I869ae07c834f6d76180d2e29871b8dc9ccb3f523
Reviewed-on: http://codereview.qt-project.org/4963
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
2011-09-16 08:54:47 +02:00
Frederik Gladhorn
79b19fd859 Accessibility: TabWidget - remove virt children, add action interface.
Remove virtual children by creating accessible objects for
tab buttons. Add action interface to activate tabs.

Change-Id: Ifc5e8ae6ec2708df97bbb9a94ddc1421d431ff87
Reviewed-on: http://codereview.qt-project.org/4793
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-16 08:54:47 +02:00
Frederik Gladhorn
ce9296a2a0 Set accessible name on QTabBar buttons.
Change-Id: Id1993d75ec56952b26f158997414b43b857808cd
Reviewed-on: http://codereview.qt-project.org/4791
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-16 08:54:47 +02:00
Frederik Gladhorn
b62adb5dda For complex widgets try to return accessible interfaces.
Some of the complex' widgets children can return
QAccessibleInterfaces.
Ideally all complex widgets should be removed, this eases the transition.

Change-Id: If3d7f28f97dac8cf5018a2c4c4b33709a3d4595c
Reviewed-on: http://codereview.qt-project.org/4788
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-09-16 08:54:47 +02:00
Jędrzej Nowacki
f005dee1b3 Fix xcb-icccm 3.8 support
Build fix on platforms having xcb-icccm >= 3.8

Change-Id: Ia20c9a439d57e147db90d635679e471bfa02c840
Reviewed-on: http://codereview.qt-project.org/4779
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-15 20:39:28 +02:00
Jędrzej Nowacki
b0fa5d66ac Fix Xcb autodetection during configure.
Change-Id: I550e633d49cfcf4df393ae7d691e7f407276eb58
Reviewed-on: http://codereview.qt-project.org/4781
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
8e67ef4794 Boost performance of QChar::isSpace
Make it inline; add fast checks for typical spaces;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isSpace ~340x faster for
ascii spaces, ~170x faster for non-space ascii
characters, and ~1.3x faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the behavior
is the same.

Change-Id: I9438d0ad3c9ba2e80560c4bee7eed05115265798
Reviewed-on: http://codereview.qt-project.org/4905
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
08d1ca1053 Boost performance of QChar::isLetterOrNumber
Make it inline; add fast checks for ascii letters
and digits; add fallback function that uses the
fastcall calling convention.

On ia32, this change makes isLetterOrNumber ~120x
faster for ascii letters and digits, ~150x faster
for non-letter/digit ascii characters, and ~1.3x
faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: Ia4e13692f4dd79f6aa0b96da29449e0487971b0e
Reviewed-on: http://codereview.qt-project.org/4904
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
a48e9af146 Boost performance of QChar::isLetter
Make it inline; add fast checks for ascii letters;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isLetter ~370x faster for
ascii letters, ~250x faster for non-letter ascii
characters, and ~1.5x faster for non-ascii characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: I06f8d3d43114537cee5567e670898cef6494c20a
Reviewed-on: http://codereview.qt-project.org/4903
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
5639423ea7 Boost performance of QChar::isDigit
Make it inline; add fast checks for ascii digits;
add fallback function that uses the fastcall calling
convention.

On ia32, this change makes isDigit ~370x faster for
ascii digit characters, ~250x faster for non-digit
ascii characters, and ~1.5x faster for non-ascii
characters.

Note that this change is NOT binary compatible.

Also add an autotest with expected results from
before the optimization, to ensure that the
behavior is the same.

Change-Id: I718fadecda3f591d6f4c22374d8e476f4724fd83
Reviewed-on: http://codereview.qt-project.org/4902
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
4cd9d267e7 Boost performance of QChar::is{Upper,Lower}
Calling QChar::category() is slow; do some fast checks to
detect ascii characters before falling back to the generic
handling.

On ia32, this change makes isUpper ~260x faster for uppercase
ascii characters, and ~180x faster for non-uppercase ascii
characters. Similar numbers for isLower.

Even with the additional checks, these versions are slightly
faster than before for non-ascii characters as well, since
we now call the static fastcall category(ushort) function,
which is faster than the category() member function (which
uses the stack to pass the unicode value).

Change-Id: I6ae0df466bb4835ca0d5319fd6018862c849313b
Reviewed-on: http://codereview.qt-project.org/4901
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Kent Hansen
6e55715581 Add benchmark for QChar
The benchmark isn't exhaustive, but tests the functions
that are heavily used by QtDeclarative.

For performance reasons, QtDeclarative has its own
implementation of various QChar functions (in
qdeclarativeutils_p.h). But we want to make the actual
QChar functions as fast, so that QtDeclarative can also
use them.

Change-Id: Ic25f30651224c39f2824380d679b8500739f38c3
Reviewed-on: http://codereview.qt-project.org/4900
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-09-15 20:39:28 +02:00
Frederik Gladhorn
4b3a551e05 Fix include path.
Reviewed-by: Gabi

Change-Id: I99b08f8b41f483c92ae175630b812e4b299069b6
Reviewed-on: http://codereview.qt-project.org/4916
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2011-09-15 20:39:28 +02:00
Frederik Gladhorn
9d3417d2a8 The Q_WS_X11 define exists no longer. Use Q_OS_UNIX.
Change-Id: I1c4b5d4187e1593aa52bc9162d9692959b55e077
Reviewed-on: http://codereview.qt-project.org/4786
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-09-15 20:39:28 +02:00