summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Optimized QMatrix4x4 by improving how 'flagBits' are used.Kim Motoyoshi Kalland2011-08-292-408/+572
| | | | | | | Change-Id: Ic417336489d334e25b547c719d457faf65307cac Reviewed-on: http://codereview.qt.nokia.com/3670 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix typo for ifdef QT_NO_ACCESSIBILITYFrederik Gladhorn2011-08-261-1/+1
| | | | | | | | | | Reviewed-by: TrustMe (cherry picked from commit eaf3b5ff76e4866ef3597110c6e565305c3298ad) Change-Id: I21df13a24fc5d339c5fcbf38f151c0339e1c87a9 Reviewed-on: http://codereview.qt.nokia.com/3042 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Call QAccessible::updateAccessibility when a widget is deletedJosé Millán Soto2011-08-261-0/+4
| | | | | | | | | | | Merge-request: 1310 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> (cherry picked from commit df3f763920b1450733817596148e087d11c0c543) Change-Id: I74fb08104c5dc527f9e9ac88776e4aa2623a3385 Reviewed-on: http://codereview.qt.nokia.com/3041 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Call QAccessible::updateAccessibility when setText is called on QLabelJosé Millán Soto2011-08-261-0/+9
| | | | | | | | | | | | | | | The method is called when the text of a label is changed and setAccessibleName has not been called on the label, as the text of the label acts as the accessible name of the label. Merge-request: 1301 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> (cherry picked from commit a1f2b68e97477440cf508e6d497eb5f5d9971971) Change-Id: Ic10f75e72ac3faa84777c444177b287b720a1dc2 Reviewed-on: http://codereview.qt.nokia.com/3040 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Check if bridge plugin vector is still valid.Frederik Gladhorn2011-08-261-1/+1
| | | | | | | | | | | Q_GLOBAL_STATIC may be destroyed and we still send ObjectDestroyed notifications. This only shows now that we actually send the Destroyed notifications. Change-Id: I3057556cdc897dab6adfc3274e4abc68473ffa7f Reviewed-on: http://codereview.qt.nokia.com/3657 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fix crash when fallback font is not #0 in multi font engineEskil Abrahamsen Blomfeldt2011-08-262-0/+7
| | | | | | | | | | | | | | | | | | | | | Easily reproducible by testing Chinese with the threaded renderer. The multi engine would then have a list of engines with a single item, but the glyphs might belong to e.g. engine 11. In that case, engine() would assert when it couldn't find the engine if the layout had been done in a different thread. We force the loading of the required engine if it's not already loaded. Note that this fix does not work on Mac, as loadEngine() will crash there, so the layout has to be done in the same thread as the rendering, since loading the engines is part of the layout process. Task-number: QTBUG-21112 Change-Id: I71cc396664e3b95fbb4815a90873457e1f89528e Reviewed-on: http://codereview.qt.nokia.com/3631 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix justification of RTL textEskil Abrahamsen Blomfeldt2011-08-251-1/+2
| | | | | | | | | | | | | | | | | | | | Since the trailing space is included in the QScriptLine, it may affect the positions of preceding script items when the text is RTL. The best solution for this would be to disregard the trailing space in the layout process, or somehow make it have an advance of 0 so it doesn't affect the layout. However, to minimize the impact of the change, and to be consistent with previous work arounds such as bf992df6434fc37715f728ca09601c5567dd83c9, we simply include the trailing (visually leading) space in the justification pass for now. Task-number: QTBUG-20920 Reviewed-by: Lars (cherry picked from commit 1a8a36eb6b6df9e2550b5eaa4606f2d411fd4294) Change-Id: I94972ebaea2e1bdb09950523c43844351b304abe Reviewed-on: http://codereview.qt.nokia.com/3462 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Add constants to QAccessible::Event enum.Frederik Gladhorn2011-08-251-34/+34
| | | | | | | | | | Reviewed-by: Gabi (cherry picked from commit 81036d4be6122dfcb55a4852bcc1037c7d8f7309) Change-Id: Id818d9c9e53ece0c93b89649db5aa31d59920426 Reviewed-on: http://codereview.qt.nokia.com/3031 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add a QApplication::queryKeyboardModifiers() method.David Faure2011-08-258-17/+60
| | | | | | | | | | | | | | | QApplication::keyboardModifiers returns the keyboard modifiers from the last keypress event in this process, as documented. However there are use cases for querying keyboard modifiers as they currently are, see QTBUG-11243. Merge-request: 585 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> (cherry picked from commit 3b5354386225974ea6db78c12f32cb81e2d50104) Change-Id: I9b4e54ac79fc225e3ed8d2bcaba953a6eb59f0d2 Reviewed-on: http://codereview.qt.nokia.com/3581 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add IAccessible2 table2 implementation.Frederik Gladhorn2011-08-2213-19/+311
| | | | | | | | | | | | | | | | | | | | | | | | | Implement the IAccessible table2 interface for itemviews. This is simpler than what we have in complexwidgets. For now it is only used on Linux. The new table2 interface is ifdef'ed to only be used on X11. Improve handling of accessible events and clean up. There are two xfails for the Table and Tree where sibling navigation is not implemented yet. Reviewed-by: Gabi (cherry picked from commit e797ba558dddd45522b5a317316e497e9efc44a8) (cherry picked from commit eff5ecc5d8f65fa25d6cfd6ed96a9d2a00d0c663) (cherry picked from commit d29876008fad400bca8d6b37e5d5f61dd1bcb39d) (cherry picked from commit 2a326fdc8f8bf2bd2c5764394616100906d9db2d) (cherry picked from commit 9b72e79e20d0d3560e0b064b8b0d75e35feb720e) (cherry picked from commit 075b0f744363842ed4179c644d933d461389544f) Change-Id: I654f74991830ae1fc7df7cc91d930390fb88b2a4 Reviewed-on: http://codereview.qt.nokia.com/3274 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Enablers for using QGlyphRun in SceneGraphEskil Abrahamsen Blomfeldt2011-08-1910-39/+196
| | | | | | | | | | | | | | | | | Several required fixes and changes to fix problems that arose when porting SceneGraph's QSGTextInput and QSGTextEdit to use QSGTextNode, especially related to having selections on the text. Also fixes crashes with the threaded renderer on Mac OS X when using the TextEdit or TextInput elements. Task-number: QTBUG-18019, QTBUG-20017 Change-Id: I67f24465352daa1d2cb12b6d2f378feb676c9804 Reviewed-on: http://codereview.qt.nokia.com/2864 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fixed broken lookup of fallback fonts on qpaRohan McGovern2011-08-191-2/+1
| | | | | | | | | | | | | | Loading of fallback fonts from the font cache was broken. While iterating through fallback fonts, we would incorrectly skip any fonts which were already in the cache. This would cause unstable lookup results for some fonts, depending on the order in which fonts were loaded during the current process. Change-Id: I56a6a07e93196ed14f33f4cc181e41c5b8f19498 Reviewed-on: http://codereview.qt.nokia.com/3059 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use name for combobox on Unix.Frederik Gladhorn2011-08-181-0/+18
| | | | | | | | | | | | | This is more conforming to the AT-SPI specs. Also we have working relations for the label when a buddy is set. Reviewed-by: Gabi (cherry picked from commit 8be3168aa2f300f9a93a53b417704f3f10b1dc8b) Change-Id: I1831d5063b003df2d209aba99d54558b6493a3e9 Reviewed-on: http://codereview.qt.nokia.com/3027 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Rename textBeforeOffsetFromString to start with q.Frederik Gladhorn2011-08-181-3/+3
| | | | | | | | | | | | Exported functions should start with q. Reviewed-by: TrustMe (cherry picked from commit 4fcb7c233c3c8d748d66bf698df059ad7546ae88) Change-Id: Idc53d3ec49f73227a9fd12b6b88aade35c7cdf25 Reviewed-on: http://codereview.qt.nokia.com/3026 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Implement text interface for QLineEdit.Frederik Gladhorn2011-08-181-0/+112
| | | | | | | | | | | | | Add boundary helper functions to the QAccessibleTextInterface. Move LineEdit over to use QTextBoundaryFinder. Reviewed-by: Jan-Arve (cherry picked from commit c1ec1a95806cda54d5b4e9f8ed159a611bd75964) Change-Id: Ib93599c49110aab50debe1e3fb0073dd34071c87 Reviewed-on: http://codereview.qt.nokia.com/3025 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix bidi reordering of RTL text with embedded imagesEskil Abrahamsen Blomfeldt2011-08-181-2/+0
| | | | | | | | | | | | | | | | According to the UBA, the object replacement character should be considered ON. There's no reason to special case its directionality, as the bidi algorithm will already have given it an implicit directionality. Task-number: QTBUG-20910 Reviewed-by: Lars (cherry picked from commit 2657bfa7c4de9f114331d1714a306b3999ae30d8) Change-Id: I1c8e45d67ef44b1b6f96edb2f5074331b5422eb7 Reviewed-on: http://codereview.qt.nokia.com/2999 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Minor optimizations for QTextEngineRitt Konstantin2011-08-181-17/+25
| | | | | | | | | | | | | | | Optimize script assignment, skip calls to QUnicodeTables::script() for the codepoints handled explicitly. Make the helper functions of QTextEngine::elidedText() inlined Merge-request: 1298 Reviewed-by: yoann (cherry picked from commit 857202824e7d6083eeb87fc52d3770f8fd82b559) Change-Id: I1afc6405a800dbc2b5f63a2f98c63e607e3ee255 Reviewed-on: http://codereview.qt.nokia.com/2998 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix typo in comment.Frederik Gladhorn2011-08-181-1/+1
| | | | | | | | (cherry picked from commit f067c2b3016182862e82805b13c7944ebe8671a9) Change-Id: Iac3673db666e53f5e1a20f95a59df15a6ad9c137 Reviewed-on: http://codereview.qt.nokia.com/3022 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Avoid bogus accessibility focus events from menus.Frederik Gladhorn2011-08-181-0/+4
| | | | | | | | | | | | | Do not send accessibility focus events when menus are involved. There are focus events to preserve the old focus when showing a new popup window. Reviewed-by: Jan-Arve (cherry picked from commit 32079bb0b348ef5f7126e69be9bcfb249c1a6412) Change-Id: Id4838a3aede1d60a1850385e97660d085f055d64 Reviewed-on: http://codereview.qt.nokia.com/3021 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* When asking for relations, don't crash on children that don't return an ↵Frederik Gladhorn2011-08-171-4/+7
| | | | | | | | | | | | interface. Reviewed-by: Jan-Arve (cherry picked from commit a816cb0d26ebcef54e9e61c72455509edf6c44b9) Change-Id: I8fed57eb0dfd5b67dee440b19c0ad5b9d7b3ae2d Reviewed-on: http://codereview.qt.nokia.com/3020 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* FocusScope's focusItem must always be a descendentAlan Alpert2011-08-151-16/+18
| | | | | | | | | | Task-number: QTBUG-20699 Reviewed-by: Michael Brasser Change-Id: Iaaaabaabaabaabaabaaaaaffaaaeaaaaaaaacaaa (cherry picked from commit 0ee51351894296df7328f206e444ece262692f3f) Reviewed-on: http://codereview.qt.nokia.com/2931 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Don't endless loopAlan Alpert2011-08-151-1/+1
| | | | | | | | | | Task-number: QTBUG-20699 Reviewed-by: Michael Brasser (cherry picked from commit ce36e8afa47e3625737208b5a912f9f191a59678) Change-Id: Iaaaabadbabaaaeaaaaaaaaffaaaeaaaaaaaacaaa Reviewed-on: http://codereview.qt.nokia.com/2757 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Don't leak MouseEventsAlan Alpert2011-08-151-2/+2
| | | | | | | | | | | Based off merge request 1312 Reviewed-by: Michael Brasser (cherry picked from commit 206c9ba930095efb6d569f6e61a9809f16361dd5) Change-Id: Iaaaabadbadbadaaaaaaaaaffaaaeaaaaaaaacaaa Reviewed-on: http://codereview.qt.nokia.com/2843 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* QLabel documentation: add warning about sanitizing inputPeter Hartmann2011-08-101-0/+7
| | | | | | | | | | | | make users more aware of QLabel guessing the text format. Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> (cherry picked from commit 31f7ecbdcdbafbac5bbfa693e4d060757244941b) Change-Id: I681c7daf568a6107b01908fa85d2da2a7e4e228a Reviewed-on: http://codereview.qt.nokia.com/2817 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove all non-const operator==Harald Fernengel2011-08-098-49/+5
| | | | | | | | | | | We had to leave the non-const operator== for binary compatibility. Remove them all, just leave the const version in there. 100% source compatible. Change-Id: Ib7a70fb441fe51d5164d9cbf495cbeda0f48fafe Reviewed-on: http://codereview.qt.nokia.com/2773 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
* Change mouse and wheel QPA events to use QPointF.Laszlo Agocs2011-08-085-32/+32
| | | | | | | | | | At least QMouseEvent already uses QPointF so there is no reason to restrict handleMouseEvent to integer positions. Change-Id: I9c72d2e0e99518b40a1898aec9ad2b3421a3e9e2 Reviewed-on: http://codereview.qt.nokia.com/2739 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use more numerically robust algorithm to compute QBezier::pointAt().Alan Alpert2011-08-051-18/+18
| | | | | | | | | | | | | | | QBezier::pointAt() could potentially return values outside the bezier's bounds, even when the bezier was a straight horizontal line. For example, with y = 0.5, it would produce y=0.5 or y=0.49999999999999 for different values of t, which when rounded cause jittering in a QML PathView. Task-number: QTBUG-17007 Task-number: QTBUG-18133 Cherry-pick-of: 8b66982ec7b4b5d2071931c288973dce73dc9875 Change-Id: I4ecac7b9085aaaaaaaaaaaaaaaaaaaaaa7d7b0bc Reviewed-on: http://codereview.qt.nokia.com/2467 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Switch to use floating point pixelSize in QRawFont completelyJiang Jiang2011-07-297-13/+13
| | | | | | | | | | Reviewed-by: Eskil (cherry picked from commit 500f8a4368be85a0ae8b7c46012deb0ab0c844ad) Change-Id: I6cfebcbb68697c9bf7a5634e98a09a26928467d7 Reviewed-on: http://codereview.qt.nokia.com/2386 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix off-by-one error in binary searchJiang Jiang2011-07-291-1/+1
| | | | | | | | | | | | | | | | This one-line change makes the binary search in QTextEngine::findItem behave consistently with the linear search that it replaced in commit acf678e57ed088f3e56a551cac6c7c3322005750. The new behavior seems to cause crashes in kword (and perhaps other applications) by triggering a logClusters assert, although I have been unable to create a unit test that reproduces this. Task-number: QTBUG-17209 Done-by: Dr. Robert Marmorstein <robert@narnia.homeunix.com> Change-Id: I68b79f024e9836e1cc8b0f3514889120541eb2ea Reviewed-on: http://codereview.qt.nokia.com/2343 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add notify signals for QIntvalidator, QDoubleValidator, QRegExpValidatorCharles Yin2011-07-292-16/+112
| | | | | | | | | Task-number:QTBUG-19956 Change-Id: I5ab5e4494189ece5b0eb1f63e73e49cb2c4e9656 Reviewed-by:Michael Brasser Reviewed-on: http://codereview.qt.nokia.com/2147 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Emit selectionChanged signals when input method alters selection.Andrew den Exter2011-07-281-5/+12
| | | | | | | | | | | | | Mark the selection as dirty if an input method event contains a selection and emit selectionChanged() if it's not emitted by finishChange(). Task-number: QTBUG-19731 Change-Id: Ief6f06f40071f64dae4db0ba365676c059a39c7e Reviewed-on: http://codereview.qt.nokia.com/2081 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix obsolete contact emailJason McDonald2011-07-281-1/+1
| | | | | | | | | | | Replace the old Trolltech contact email address with the current Qt contact email address. Task-number: QTBUG-20370 Change-Id: If5b9c3a044e1ee46264548eea456c704ced8e363 Reviewed-on: http://codereview.qt.nokia.com/2153 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make QTabWidget::tabBar() public.David Faure2011-07-261-1/+2
| | | | | | | | | | | | This is very much useful to be able to write things like myTabWidget->tabBar()->setSelectionBehaviorOnRemove( QTabBar::SelectPreviousTab ); without subclassing QTabWidget. Change-Id: Ic7c42709ea1086631d37f90f184b058c4b6e9601 Merge-request: 3 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/2172 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Improve doc to avoid row vs col major confusion.Sarah Smith2011-07-261-0/+16
| | | | | | | | | | | | | There has been a few reports of user confusion from the fact that the constData and data functions return results in column-major format. There is nothing in the doc anywhere that states this, and nothing states that the class is especially for OpenGL which would give a clue at least. Change-Id: I3a9afde0fbeb8b9d2bcba6a387620b60a56774b9 Reviewed-on: http://codereview.qt.nokia.com/2066 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Julian de Bhal <julian.debhal@nokia.com>
* Emit selectionChanged signals when input method alters the selection.Andrew den Exter2011-07-261-0/+3
| | | | | | | | | | | | | Check if the input method removes the selection and force emit selectionChanged if it sets a new selection. Task-number: QTBUG-19727 Reviewed-by: Martin Jones Change-Id: Ic8ea1044d0917aac4e52368f431ac9e5c7db7c56 Reviewed-on: http://codereview.qt.nokia.com/2076 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Update cursor position when selection is reversed.Andrew den Exter2011-07-261-7/+7
| | | | | | | | | | | | | | A reversed selection will have the same resolved start and end positions but a different cursor position so testing the end points alone doesn't guarantee the selection is the same. Task-number: QTBUG-19456 Reviewed-by: Martin Jones Change-Id: I516e5a501ec878d673f21e54d688fd2d21b624ef Reviewed-on: http://codereview.qt.nokia.com/2080 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add initial support for bitmap version 4/5 headers.Ilya Konkov2011-07-251-9/+55
| | | | | | | | | | The headers are just skipped, information stored in them is ignored. Merge-request: 824 Change-Id: I48f37757114ed83cd5c92cb3d5a43eeaca4b91b3 Reviewed-on: http://codereview.qt.nokia.com/2108 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Changed QLibrary::resolve() to return a function pointer.Kim Motoyoshi Kalland2011-07-252-5/+7
| | | | | | | | | | | According to the C++ standard, there is no guarantee that you can cast between function pointers and void pointers without data loss (section 5.2.10-6). Change-Id: I27f4d835e4c8ca8ecca0d76cfea9ce34491956bd Reviewed-on: http://codereview.qt.nokia.com/1995 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Making cached glyphs drawing check clearerJiang Jiang2011-07-253-5/+13
| | | | | | | | | | | | Putting the logic inside supportsTransformation() is a bit confusing and that name is misleading. Also move the same check in GL2 paint engine to the same place. Change-Id: I182500a0ff375122e6be966b7ce2495c84d113d0 Reviewed-on: http://codereview.qt.nokia.com/2096 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Delay masking the last character in Password echo mode.Andrew den Exter2011-07-252-3/+77
| | | | | | | | | | | | | | | | | | | | | | If QT_GUI_PASSWORD_ECHO_DELAY is defined in qplatformdefs.h with an integer value in milliseconds, QLineEdit and TextInput will display the last character entered unmasked for that delay period and then mask the character as normal. If QT_GUI_PASSWORD_ECHO_DELAY is not defined then the behaviour is unchanged. Task-number: QTBUG-17003 Reviewed-by: Martin Jones (cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971) Conflicts: src/declarative/graphicsitems/qdeclarativetextinput.cpp tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp Change-Id: I3683223189b7176e4ef5081ee315c95a0efb9cfe Reviewed-on: http://codereview.qt.nokia.com/2060 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Use QUuid::toByteArray() instead of QUuid::toString().toAscii()liangqi2011-07-221-1/+1
| | | | | | | | | This is a cheaper way. Change-Id: Ibfc67e0ac46a77e95b2ef32cd6f28c7409c42d63 Reviewed-on: http://codereview.qt.nokia.com/2037 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Add support for rawFonts loaded from data in FaceIdPierre Rossi2011-07-212-1/+4
| | | | | | | | | | | | | The problem was that with an empty filename and index of 0, all raw fonts loaded from data had the same FaceId, and we wouldn't bother to load another one after doing this once. This commit introduces a uuid in FaceId to help distinguish them in that case. Change-Id: I93655ff07a7d8856af1f854024e207c519f8ed1a Reviewed-on: http://codereview.qt.nokia.com/1882 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fixed memory leak in the TIF handler.Kim Motoyoshi Kalland2011-07-211-5/+8
| | | | | | | Change-Id: Iaa3093b172ddbac6597169ee4217a7f6c7867e60 Reviewed-on: http://codereview.qt.nokia.com/1952 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed clipping errors for non-extended paint engines.Samuel Rødal2011-07-211-0/+9
| | | | | | | | | | | | | | Partially revert change a33ef62469fd71bec for the non-extended paint engine path. Task-number: QTBUG-19525 Reviewed-by: Andy Shaw (cherry picked from commit f370dd07560c449ba17d13475721f7d3b46e6b24) Change-Id: I19eaaa265a54b2df65a8ec73e36fbdf58b1a4334 Reviewed-on: http://codereview.qt.nokia.com/1211 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Doc: Removed documentation for deleted code.David Boddie2011-07-2110-333/+0
| | | | | | | Change-Id: Icdbc05decac3dfe3fc18ce073c494e1fce4ea347 Reviewed-on: http://codereview.qt.nokia.com/1824 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Get rid of the evilness of Q_GLOBAL_STATIC_WITH_INITIALIZERThiago Macieira2011-07-214-52/+58
| | | | | | | | | | | | | | | | | | | That macro is a nightmare. It leads to writing code that is thread-unsafe or other problems. So rewrite the code that used this macro to use special-purpose classes with constructors. This commit does not introduce new errors. The FIXME in qicon.cpp (qtIconCache()) was a condition already present. It does fix the race conditions that were present in qbrush.cpp nullBrushInstance() and qfontengine.cpp qt_grayPalette(). Specialising QGlobalStatic is also evil. Change-Id: I039311f6a5ac9ea4ad7b310b870a2adf888da7e5 Merge-request: 10 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1895 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Add a way to check if we have a matching family in the database.Pierre Rossi2011-07-202-0/+12
| | | | | | | | | | | | | | This is needed in order to get proper font fallback, and incidentally webfonts, working in QtWebKit. See: https://bugs.webkit.org/show_bug.cgi?id=55036 Internal for now, maybe it could be made public for a future release. Task-number: QTBUG-15575 Change-Id: I5c454689125cd9d5fda26ff2149208ed1beec24d Reviewed-on: http://codereview.qt.nokia.com/1829 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Do not use qRound with integersOlivier Goffart2011-07-201-1/+1
| | | | | | | | | | Required for https://qt.gitorious.org/qt/qtbase/merge_requests/17 Change-Id: I5319ea99eb083c5931c55a246f7057fbc88c8fa4 Reviewed-by: Thiago Reviewed-on: http://codereview.qt.nokia.com/1866 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Use truncate only for subpixel boundingBox x positionJiang Jiang2011-07-202-3/+3
| | | | | | | | | | | | | | | | | | Since Lion, Core Text starts to return fractional values for x origin in the glyph bounding box. To get correct alignment we need to make it integer, it seems that round will cut certain pixels (x = 0.6 will be round to 1, then that glyph will be moved too much to the left in image glyph cache). Reverting 4297b85a appears to work fine on previous version of Mac OS X as well. This change will not affect Windows (DirectWrite) and FreeType font engines since they both return integer values for that. Change-Id: I830f5b0bd27cad3a3a84b157da428134fb979703 Reviewed-by: Eskil Reviewed-on: http://codereview.qt.nokia.com/1667 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Deprecate some QPixmap functions (marked as obsolete already).Samuel Rødal2011-07-141-3/+7
| | | | | | | | | | Reviewed-by: Olivier Goffart (cherry picked from commit fb4903c4eca6a085c4c39078c11de03f5791f08e) Change-Id: I87208fe830b47412b40044070fbdad4ed3d0af8c Reviewed-on: http://codereview.qt.nokia.com/1551 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>