summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* testlib: Remove widgets dependency when only using guiKent Hansen2011-09-215-1/+53
| | | | | | | | | | | There's api in testlib that should only be available if the application links against widgets. Change-Id: I22e382c6710690866ed8ffed81bae27b548dc830 Reviewed-on: http://codereview.qt-project.org/5094 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Implemented key filter support on platform input contextPekka Vuorela2011-09-203-3/+17
| | | | | | | | | | | As previously with QInputContext, now supporting filterEvent() interface. Usage only on XCB so far. Change-Id: I8e5972626552bda32318fe060017d0217bb79a94 Reviewed-on: http://codereview.qt-project.org/5240 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cocoa: Adjust touch point rectangle by -0.5.Bjørn Erik Nilsen2011-09-201-1/+8
| | | | | | | | | | | The actual touch point is supposed to be in the center of the rectangle, and since the rectangle is 1x1 it means we have to subtract 0.5 from x and y. Change-Id: Ica4aba26dbe61328c8e7cbdcf8b02c96e2f41a40 Reviewed-on: http://codereview.qt-project.org/5256 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* Cocoa: Update the geometry whenever the window moves.Bjørn Erik Nilsen2011-09-201-1/+10
| | | | | | | Change-Id: I3d47d62aaa0b4ccc88159ba9b6d1a3ebd42fedf5 Reviewed-on: http://codereview.qt-project.org/5255 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* Cocoa: Add helper functions for NSPoint <-> QPoint(F) conversion.Bjørn Erik Nilsen2011-09-202-2/+19
| | | | | | | | | | ... and use [NSEvent mouseLocation] as global mouse position rather than relying on QCursor::pos() (which is buggy at the moment). Change-Id: Ieb8000089d0d824bed89abd8b2add9e28273f227 Reviewed-on: http://codereview.qt-project.org/5254 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* QWindowSystemInterface: Fix wrong mapping of coordinates.Bjørn Erik Nilsen2011-09-201-2/+14
| | | | | | | | | | | | | QTouchEvent::TouchPoint assumes the rect() is in local coordinates, whereas QWindowSystemInterface::TouchPoint uses screen coordinates. We must therefore use QWindowSystemInterface::TouchPoint::area as the screenRect() rather that the rect() and then use the screen coordinate to calculate the local coordinate by using mapFromGlobal. Change-Id: If7a52f5668c3938f46bdd38a5ea82b5313d6b626 Reviewed-on: http://codereview.qt-project.org/5253 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* [blitter] Fix memory leak in the blitter paintengineHolger Hans Peter Freyther2011-09-201-5/+5
| | | | | | | | | | | The raster engine and the capabilities were leaked, use the QScopedPointer to prevent that from happening. Change-Id: I31ba0117280b48ad942fbb638fb151ccb7b34385 Merge-request: 59 Reviewed-on: http://codereview.qt-project.org/5242 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* [blitter] Use QScopedPointer for the engine and blittableHolger Hans Peter Freyther2011-09-202-15/+10
| | | | | | | | | | | Use the QScopedPointer to prevent memory leaks, right now the code appears to be sound but make it more clear that calling ::setBlittable will destroy the old one. Change-Id: Idc71add7cfd429ff5b9d0ea9908d9fff1e7ce74d Merge-request: 59 Reviewed-on: http://codereview.qt-project.org/5243 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFTAleksandar Stojiljkovic2011-09-201-2/+6
| | | | | | | | | | | Task-number: QTBUG-21162 - Letters get truncated when font size=72 and set to Italic Reviewed-by: Eskil (cherry picked from commit cd43d6386de6e66379fa23c1ea4ec06141167c86) Change-Id: Ic05f775975d5f21e0274e7b2c3a4903d6a4ae41f Reviewed-on: http://codereview.qt-project.org/5203 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Generate glyphs in un-transformed coordinate system.Samuel Rødal2011-09-201-3/+4
| | | | | | | | | | | | | | Avoids rounding issues with very large coordinates. Task-number: QTBUG-21262 - QRasterPaintEngine & QFontEngineFT - fonts corrupted when scrolling to the bottom of long texts Reviewed-by: Eskil Signed-off-by: Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com> (cherry picked from commit 43e013e2048e8193e2d31276cac6348a9f6ce340) Change-Id: I5810a1a60f2bbdba4889a6b5e493b183018f3976 Reviewed-on: http://codereview.qt-project.org/5202 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Avoid double caching glyphs in raster/QPA/FreeTypeEskil Abrahamsen Blomfeldt2011-09-207-119/+181
| | | | | | | | | | | | | | | | | | | | | Since FreeType has internal caching, it has had a special code path in the raster engine which avoided using Qt's glyph cache, as that would be redundant. However, when compiling with QPA, we want the same behavior without being able to access the QFontEngineFT class. To achieve this, I've made a new abstraction and added it to QFontEngine which allows the FT engine to provide direct pointers into the alpha maps stored by FT. This requires a locking/unlocking mechanism. Yes, the QFontEngine::alphaMap* API is slowly becoming a horrible mess, but due to time constraints, the task of refactoring these functions into a more flexible API needs to wait. I've added a TODO comment for this. Change-Id: I08237403c2967f8fb952258178676f33a87c0353 Reviewed-on: http://codereview.qt-project.org/5155 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* No dependencies on opengl, widgets and printsupportLars Knoll2011-09-192-2/+1
| | | | | | | | | | | The problem is that the libQtPlatformSupport.prl file will otherwise add these as link dependencies, making any platform plugin link against these. Change-Id: Ief71726e86990bb44b12cf86e78b844a1a23ae3c Reviewed-on: http://codereview.qt-project.org/5098 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed wrong mouse coordinate mapping.Samuel Rødal2011-09-191-4/+1
| | | | | | | | | | QApplication::pickMouseReceiver() does the appropriate mapping if the receiver changes. Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac Reviewed-on: http://codereview.qt-project.org/5148 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cocoa platform plugin: Reduce multitouch area to be one pixel.Bjørn Erik Nilsen2011-09-192-2/+5
| | | | | | | | | | 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>
* Fix regression causing synthesized oblique glyphs to clipEskil Abrahamsen Blomfeldt2011-09-191-1/+15
| | | | | | | | | | | | | | | | | In 20009ed797fb30952a889df5716aa2399102be58 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>
* Cocoa platform plugin: update headers for multitouch.Bjørn Erik Nilsen2011-09-192-2/+2
| | | | | | | | | | 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>
* Cocoa platform plugin: Implement multitouch support.Bjørn Erik Nilsen2011-09-193-0/+34
| | | | | | | 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>
* Mac: Adapt multitouch code for cocoa to QWindowSystemInterface.Bjørn Erik Nilsen2011-09-192-32/+20
| | | | | | | 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>
* Mac: Move multitouch support from widgets to cocoa platform plugin.Bjørn Erik Nilsen2011-09-192-0/+0
| | | | | | | 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>
* Make sure to clip in QXcbBackingStore::flush()Samuel Rødal2011-09-191-3/+12
| | | | | | | | | 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>
* Move handling of -qmljsdebugger argument to QCoreApplicationKai Koehne2011-09-194-4/+28
| | | | | | | | | | | | 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>
* Say hello to QWindow::accessibleRoot()Jan-Arve Saether2011-09-192-0/+12
| | | | | | | 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>
* Add parent and child functions to QAccessibleInterface.Frederik Gladhorn2011-09-1915-501/+490
| | | | | | | | | | | | | | | | | | | | | | 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>
* Initialize in the right orderGunnar Sletta2011-09-191-2/+2
| | | | | | | 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>
* Support synthesized oblique and bold in SceneGraphEskil Abrahamsen Blomfeldt2011-09-192-3/+21
| | | | | | | | | | | | | | | 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>
* Enable glyph caching on QPAEskil Abrahamsen Blomfeldt2011-09-191-31/+3
| | | | | | | | | | | | 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>
* Remove gui-related ifdef from testlib/qbenchmark.cppKent Hansen2011-09-191-4/+0
| | | | | | | | | | 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>
* Treat QTestFontEngine properlyJiang Jiang2011-09-191-1/+1
| | | | | | | | | | 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>
* correctly initialise private data in QTouchEventSequence constructorMatthew Cattell2011-09-171-2/+2
| | | | | | | 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>
* Make sure libQtPlatformSupport has proper flagsJiang Jiang2011-09-171-0/+1
| | | | | | | | | | | 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>
* minor docu fixesKonstantin Ritt2011-09-171-5/+5
| | | | | | | | | | | 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>
* Wrap calls to Sequence::push_backJoão Abecasis2011-09-173-15/+32
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Compile in C++0x modeLars Knoll2011-09-171-4/+8
| | | | | | | 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>
* Fixed XComposite hardware integration in wayland plugin.Samuel Rødal2011-09-173-3/+3
| | | | | | | | | | 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>
* Set the correct buffer pointer (protected member variables are evil).Samuel Rødal2011-09-171-1/+1
| | | | | | | 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>
* Fix trailing spaces problem by not adding it to QScriptLine.lengthJiang Jiang2011-09-173-5/+7
| | | | | | | | | | | | | | | | | | | | | | 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>
* Avoid fontconfig access in fontEngine creationJiang Jiang2011-09-172-43/+25
| | | | | | | | | | | | 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>
* Mac: fix linking with Qt frameworks which don't exist at qmake timeRohan McGovern2011-09-171-0/+1
| | | | | | | | | | | | | | This restores the forced-vs-detection logic for Qt frameworks which was removed by commit ceed409b40fd5b8fe5c62ac33144e66f50b28ede. 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>
* Accessibility: TabWidget - remove virt children, add action interface.Frederik Gladhorn2011-09-162-73/+159
| | | | | | | | | | | 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>
* Set accessible name on QTabBar buttons.Frederik Gladhorn2011-09-161-1/+4
| | | | | | | 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>
* For complex widgets try to return accessible interfaces.Frederik Gladhorn2011-09-161-1/+5
| | | | | | | | | | | | 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>
* Fix xcb-icccm 3.8 supportJędrzej Nowacki2011-09-151-3/+15
| | | | | | | | | 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>
* Boost performance of QChar::isSpaceKent Hansen2011-09-152-5/+14
| | | | | | | | | | | | | | | | | | | | | 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>
* Boost performance of QChar::isLetterOrNumberKent Hansen2011-09-152-3/+17
| | | | | | | | | | | | | | | | | | | | | | 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>
* Boost performance of QChar::isLetterKent Hansen2011-09-152-3/+15
| | | | | | | | | | | | | | | | | | | | | 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>
* Boost performance of QChar::isDigitKent Hansen2011-09-152-3/+13
| | | | | | | | | | | | | | | | | | | | | | 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>
* Boost performance of QChar::is{Upper,Lower}Kent Hansen2011-09-151-2/+8
| | | | | | | | | | | | | | | | | | | | | 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>
* The Q_WS_X11 define exists no longer. Use Q_OS_UNIX.Frederik Gladhorn2011-09-155-14/+17
| | | | | | | 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>
* Fix warning when building objects with a Q_OBJECT macroTobias Hunger2011-09-151-1/+1
| | | | | | | | | | | | Do not trigger a self-assign warning when running into code containing a Q_OBJECT macro. Currently this happens a lot e.g. when using clang to build code using Qt. Change-Id: I68995624b18406f337318599e463f36f87486e66 Reviewed-on: http://codereview.qt-project.org/4960 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* doc: Fix incorrect enum name in QRawFont::alphaMapForGlyph docsEskil Abrahamsen Blomfeldt2011-09-151-1/+2
| | | | | | | | | | | | | There's no QImage::Format_A8 format. This is a term used in the corresponding QFontEngineGlyphCache enum. Reviewed-by: Jiang Jiang (cherry picked from commit e453fce2731069dce993a94b0c2291307cc7806c) Change-Id: I68a190abdf4446d05231af89ac861380ac79b188 Reviewed-on: http://codereview.qt-project.org/4773 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>