summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
...
* Deprecate some functions in QImage (that have been obsolete since 4.1).Samuel Rødal2011-07-141-7/+10
| | | | | | | | | | Reviewed-by: Olivier Goffart (cherry picked from commit 5ee3e4964d60f4d9cd7026c6f8b6fb93ddd39588) Change-Id: Ib536c2b5a2b51ca42ab26129142242f30f6c6759 Reviewed-on: http://codereview.qt.nokia.com/1550 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Fix warning for uninitialized variableJiang Jiang2011-07-141-1/+1
| | | | | | | | | | Reviewed-by: Eskil (cherry picked from commit 94913c337a388e3d5938ece3a460f1f6e9590cd5) Change-Id: Ie3c0986a3f5c70a654d9f14c3fae42b528c06b9e Reviewed-on: http://codereview.qt.nokia.com/1632 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix editable combobox style on MacJiang Jiang2011-07-141-5/+5
| | | | | | | | | | Reviewed-by: Jens Bache-Wiig (cherry picked from commit 459dc4a3bf0dc0ac54fc558379fdf551949dd1c6) Change-Id: I744722d46ced0c2b6139bc232a819d0d802eed0d Reviewed-on: http://codereview.qt.nokia.com/1633 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Skip boundry neutral characters in bidi itemizationJiang Jiang2011-07-141-4/+22
| | | | | | | | | | | | | | | According to UAX #9, bidiItemize should act as if those characters don't exist. If we don't, dir and status.eor here may become QChar::DirBN, thus interfere the result of bidiItemize. Task-number: QTBUG-19949 Reviewed-by: Lars Knoll (cherry picked from commit a5c3064439a9f1483565e5d9dfbf0342cd9236f0) Change-Id: I224cfdf5b38433a31d33b6d944d5770accf74546 Reviewed-on: http://codereview.qt.nokia.com/1631 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix crash when app font is addedJiang Jiang2011-07-143-19/+28
| | | | | | | | | | | | | | | | | | | Loading app fonts will clear the application font cache, but QFontPrivate::engineWithScript will try to load the font again, in Mac the font engine used here must be the one used for shaping, because subsequent sub font engines may be added to it during the shaping process (QCoreTextFontEngineMulti::stringToCMap). That is why we need to fetch the font engine directly from QTextEngine's fontEngine cache instead of QFontCache. Task-number: QTBUG-20250 Reviewed-by: Eskil (cherry picked from commit 1f90ae36cff8acf581d1624bf011fe3a55c623c0) Change-Id: Ibc0054cd7df65b65a67af4a7b15027731ba417fe Reviewed-on: http://codereview.qt.nokia.com/1630 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Apply 57993ba7 properly to 4.8Jiang Jiang2011-07-141-1/+1
| | | | | | | | | | | | | Because we have moved alignLine from qtextlayout.cpp to QTextEngine, this patch has to be applied manually. Reviewed-by: TrustMe (cherry picked from commit 705416cdc8ee91ac88d80298dbe2971a9384c196) Change-Id: Ibd657a52da1c510c839623738d49602b5c4a0824 Reviewed-on: http://codereview.qt.nokia.com/1640 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Avoid buffer overrun in QMacPixmapData resizingJiang Jiang2011-07-141-1/+1
| | | | | | | | | | | | | Shouldn't use size bigger than the original (source) pixels buffer or the new one (just allocated). Task-number: QTBUG-18547 Reviewed-by: aavit (cherry picked from commit 348894a550510e54e7709d18676b4b10c9e5e9e3) Change-Id: I7cc373b7d0f1ffef2d2f0cdddb7018c856849d29 Reviewed-on: http://codereview.qt.nokia.com/1635 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix potential crash when clicking in a text editEskil Abrahamsen Blomfeldt2011-07-131-0/+1
| | | | | | | | | | | | | | | Since the attributes() call might resize the layout and therefore delete the previous data, the logClusters pointer might be dangling at this point. We need to reget it to make sure it's valid. Task-number: QTBUG-20310 Reviewed-by: Jiang Jiang (cherry picked from commit c0772f44fb1d53608ff629fc622103698c6d0ee5) Change-Id: I20a29d0c529764eb5d41cb3383c22b6cad8de255 Reviewed-on: http://codereview.qt.nokia.com/1598 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix a crash with QGraphicsScene.Pierre Rossi2011-07-121-1/+2
| | | | | | | | | | | | | | | | | | | It happened when the scene gets deleted after ~QApplication has been called. test case: int main(int argc, char *argv[]) { QApplication a(argc, argv); QGraphicsScene *scene = new QGraphicsScene(&a); return 0; } Change-Id: I74d4023c9575242a2e334b2c786e00d0686c452b Reviewed-on: http://codereview.qt.nokia.com/1544 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fix uses of qRound on non-floating-point types.Thiago Macieira2011-07-121-2/+2
| | | | | | | | | | | It's silly to round integeres, since they are already round. At most, this would waste CPU cycles without any benefit. Change-Id: I6fc0152f4416d723b65966e5d48cc7a07957b83c Merge-request: 17 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1541 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Cleanup reference counting in QIcon classJedrzej Nowacki2011-07-113-19/+6
| | | | | | | | | | It is better to use QSharedData and QExplicitlySharedDataPointer then doing manual ref counting. Change-Id: Icbb06d92102bcc906291238c5895a05e8d0e6de1 Reviewed-on: http://codereview.qt.nokia.com/1438 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Remove some metrics parsing code from Core TextJiang Jiang2011-07-112-20/+3
| | | | | | | | | | | | | | | | | | The respective value in some of the default fonts like Lucida Grande are simply not reliable. It seems that the only reliable way to get such information is by going through all the glyphs. It seems that these code are not well tested on Mac and should be removed for now since it caused visible regressions in QLineEdit rendering. Reviewed-by: Eskil (cherry picked from commit 8032d6f4ced50837e126f28c1475ad89eaf91ad7) Change-Id: I85e71a2e3228a367659be9f5f6ec3e667e0ce902 Reviewed-on: http://codereview.qt.nokia.com/1264 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Remove more references to demos.Casper van Donderen2011-07-081-1/+1
| | | | | | | Change-Id: I431184cd0534c86047706fdaa1045b2935de5d7a Reviewed-on: http://codereview.qt.nokia.com/1307 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Don't cast a string from asciiLars Knoll2011-07-071-1/+1
| | | | | | | Change-Id: Ia902e5be3ff61057b2e895a491bb68f1b7c6dd64 Reviewed-on: http://codereview.qt.nokia.com/1221 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-07-072-34/+34
| | | | | | | | | Replace old license header with correct one. Change-Id: Ie8bf7d8d07ff01d05654bafe13ebbc1892f59cc4 Reviewed-on: http://codereview.qt.nokia.com/1178 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Fix regressions in previous QFontDatabase patchJiang Jiang2011-07-076-57/+64
| | | | | | | | | | | | | | | | | 1. QtFontStyle::Key comparison should either use styleName or style, etc., but not both. 2. When initializing a QFont from QFontDatabase::font(), style and weight parameters should always be set even when we found a match styleName, in case these parameters will be used for comparison later. 3. Move styleName out of QtFontStyle::Key so that the code can be clearer and more explicit. Change-Id: Icdee8e97568a0f31f57d2cdb8d414f47331fde75 Reviewed-by: Eskil Reviewed-on: http://codereview.qt.nokia.com/1263 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix bidi reordering when part of text is rendered by fallback fontEskil Abrahamsen Blomfeldt2011-07-061-1/+13
| | | | | | | | | | | | | | | If the fallback font is used for part of a RTL text, we need to position the different text items accordingly, subtracting the advance instead of adding it. Task-number: QTBUG-17117 Done-with: Lars (cherry picked from commit e5e1ff0d6f4e6a8457da61b5b215730de6f960bd) Change-Id: I73b501d36e5c9e12112cc1997c1d360f3a4a6083 Reviewed-on: http://codereview.qt.nokia.com/1228 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Update the documentation after moving examples.Casper van Donderen2011-07-053-6/+6
| | | | | | | Change-Id: I7aa52785979df9eddd7b91e62abd0ef10adc74b7 Reviewed-on: http://codereview.qt.nokia.com/1031 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Move some other examples around in the docs.Casper van Donderen2011-07-053-16/+16
| | | | | | | Change-Id: Ib50600ff9fd3d807b82a152abd7d587196d5b5e3 Reviewed-on: http://codereview.qt.nokia.com/932 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Doc: Fixing typoSergio Ahumada2011-07-051-1/+1
| | | | | | | | | | | | | | | | | | (cherry picked from commit 0a9652c93170ab9520869e9e231eba1834b47abc) Conflicts: tests/auto/mediaobject/tst_mediaobject.cpp tests/auto/q3accel/tst_q3accel.cpp tests/auto/q3checklistitem/tst_q3checklistitem.cpp tests/auto/q3dns/tst_q3dns.cpp tests/auto/q3popupmenu/tst_q3popupmenu.cpp tools/linguist/tests/tst_lupdate.cpp Change-Id: I118829afb27ab082f9656139102f74f9ab5f7ac4 Reviewed-on: http://codereview.qt.nokia.com/1035 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: David Boddie
* Add QScreenOrientationChangeEvent and rotation support to wayland clientLasse Holmstedt2011-07-043-0/+133
| | | | | | | | | | | Qt Compositor propagates screen orientation changes to wayland, which are then picked up by the wayland client. The wayland client then sends a QScreenOrientationChangeEvent to QApplication, which can handle the orientation change. Change-Id: Ieb2225e52b7e3c318648f2cb21dab7937f301505 Reviewed-on: http://codereview.qt.nokia.com/1063 Reviewed-by: Matthias Ettrich
* Move the composition example in the docs.Casper van Donderen2011-07-011-2/+2
| | | | | | | Change-Id: I63e906e78de75466b9c9bf99d553691c8335f9b2 Reviewed-on: http://codereview.qt.nokia.com/903 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
* Doc: Fixed qdoc warnings.David Boddie2011-07-013-7/+35
| | | | | | | Change-Id: I7b4e9ef513b82a82d2365c9256d09520a44ad10d Reviewed-on: http://codereview.qt.nokia.com/324 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix resource leak in QFontEngineDirectWriteEskil Abrahamsen Blomfeldt2011-07-011-2/+3
| | | | | | | | | | | | | Bug introduced by f54c5d9133d7aa7636988db36fa6cc51d26434b6. The release statement has to come before the return statement :) Reviewed-by: Jiang Jiang (cherry picked from commit d58eec3c932d1cdbcf3b42534e8fe870ec109487) Change-Id: Ib0b550ead3f971736142d88f4ca19bb8edc1b654 Reviewed-on: http://codereview.qt.nokia.com/949 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix transformations on DirectWrite rasterized textEskil Abrahamsen Blomfeldt2011-07-012-47/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few bugs in the DirectWrite font engine that caused transformed text to break. First of all, alphaMapForGlyph() ignored the transform, so no gray antialiased text would be transformed. Second of all, the imageForGlyph() function would use the wrong bounding box for the rasterized glyph, causing its positioning to become a little bit off when rotating. The fix is to get the bounding box from the system and add a margin to this instead of trying to predict how it will appear after the vertical hinting etc. has been applied. So that the positioning metrics are in sync with the actual metrics used by the alphaMap* functions, we also need to implement the alphaMapBoundingBox() function. Task-number: QTBUG-19829 Reviewed-by: Jiang Jiang (cherry picked from commit f54c5d9133d7aa7636988db36fa6cc51d26434b6) Change-Id: I3c3840b41e19fcacf926dbf454bdc2cba4bd5a99 Reviewed-on: http://codereview.qt.nokia.com/948 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix text color in some cases of QML and QStaticTextEskil Abrahamsen Blomfeldt2011-06-301-3/+7
| | | | | | | | | | | | | | | | | | | | | | | This reverts 518c2a58ed6fdfd7449cb4476aa8ea0d32ad16e3 which caused a regression. When writing systems are mixed and an underline is set on the font, QPainter will set a pen with the current color and a new width on itself before drawing the decoration. This would cause the recorder in QStaticText to mark the pen as dirty, saving the current pen color in all subsequent text items. The effect was e.g. that in QML the cached color would override the current one, making it impossible to change the color on the text without forcing a relayout somehow. The right fix is to only mark the pen as dirty when its color actually changes. Task-number: QTBUG-20159 Change-Id: Ia819b67cccc9eaedd23fde655eab58cd892646f8 Reviewed-by: Jiang Jiang Reviewed-on: http://codereview.qt.nokia.com/870 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add HB_LineBreakType to qharfbuzz_copy_p.h.Frederik Gladhorn2011-06-301-0/+7
| | | | | | | | | The QTextLayout relies on this enum to be defined. Change-Id: Ibcc8a0073bd56e29431c52c4ea54a909ff42f07b Reviewed-on: http://codereview.qt.nokia.com/537 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Move glyph run merging logic to QTextLayout levelJiang Jiang2011-06-302-110/+101
| | | | | | | | | So that we can merge glyph runs from different QTextLines. Change-Id: Id8e0cc1aa21a482a995773fd55599c0011245e82 Reviewed-on: http://codereview.qt.nokia.com/950 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* make QHoverEvent inherit from QInputEventLars Knoll2011-06-303-7/+9
| | | | | | | | | | QHoverEvent is an input event and as such should also contain the current keyboard modifiers. Change-Id: Ic403a8511eb991a9c6b5132908af1d5900869361 Reviewed-on: http://codereview.qt.nokia.com/937 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Remove QPainter::UniteClipGunnar Sletta2011-06-285-44/+7
| | | | | | | Change-Id: I5413cb5e2cbb53998bb40f27b9bbc16342caafe6 Reviewed-on: http://codereview.qt.nokia.com/837 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove code with no consquenceGunnar Sletta2011-06-282-35/+0
| | | | | | | Change-Id: Ic048be26cd4ffe1094e4badd34a0df233aa9b5d5 Reviewed-on: http://codereview.qt.nokia.com/832 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* compile on Mac OS XGunnar Sletta2011-06-281-1/+2
| | | | | | | Change-Id: Ibe74e51aab6e6b8d7a0e71cd88dcc97f72fcd1f9 Reviewed-on: http://codereview.qt.nokia.com/833 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Change references to affine example.Casper van Donderen2011-06-283-6/+6
| | | | | | | | | | Because of the merge of demos and examples all references to all demos have to be updated. This is the update for the affine example. Change-Id: I83f24010162a73e11786587365c6f10b51d4bf4b Reviewed-on: http://codereview.qt.nokia.com/774 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* Add missing APIs to QRawFont and some additional notes to fromFontJiang Jiang2011-06-272-0/+29
| | | | | | | Change-Id: I8487a2e32f5b71a1eb51dcb8540cb5de2def09f6 Reviewed-on: http://codereview.qt.nokia.com/769 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Use floating point coordinates in eventsLars Knoll2011-06-274-81/+39
| | | | | | | | | | Use FP coordinates in Mouse, Wheel and Hover events. Change-Id: I8b43ca257620b4653ae5d6b6122c516384db1e48 Reviewed-on: http://codereview.qt.nokia.com/766 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Only compare styleNames if they are not emptyJiang Jiang2011-06-272-2/+2
| | | | | | | | | | Task-number: QTBUG-19366 (cherry picked from commit 15e6ac8f4d9e7a419cd0c10405954bde78559fac) Change-Id: I5f06bb5133f23dbc8ad6d745d44ca0a85ef49686 Reviewed-on: http://codereview.qt.nokia.com/760 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix problem with cosmetic stroking of cubic beziersaavit2011-06-271-2/+2
| | | | | | | | | | The new algorithm would fail if the start and end point were identical. (cherry picked from commit 43ce5bab32e0d28366317be99df5e6df70787826) Change-Id: I44c42b190db95b831fd04492e4afe3555fb3db50 Reviewed-on: http://codereview.qt.nokia.com/610 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Still use midpoint rendering of aliased ellipsesaavit2011-06-272-0/+161
| | | | | | | | | | | | | 37c329a removed this, but it is required to get correct fills, particularly for small radii Reviewed-by: gunnar (cherry picked from commit 9d0104d3da01e262d2178c864b4ba94f620eaa3b) Change-Id: I41a5093f3cf725aee3abffde4d871566f0f8151e Reviewed-on: http://codereview.qt.nokia.com/608 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix smaller bugs in the strokerLars Knoll2011-06-271-7/+14
| | | | | | | | | | | | Calculating the continuation point for closed contours was not taking transformations and the half pixel offset into account. (cherry picked from commit 31e9c098f3c9321eebf1ac3e4c44a2d18d3816b8) Change-Id: I735d8e58fc3cf64668f546d5f42892d420d58e84 Reviewed-on: http://codereview.qt.nokia.com/607 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Compilation fix of f8e8583aavit2011-06-271-2/+3
| | | | | | | | | (cherry picked from commit 7cfd06ee22a875d7658ce6668b418e6f8c6f6480) Change-Id: Iaaed01590874fbcc439f06c17a63f0343d49a9bb Reviewed-on: http://codereview.qt.nokia.com/605 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Revert "Fix how subpixel positions are intepreted in an aliased grid."aavit2011-06-274-15/+46
| | | | | | | | | | | | | | | This reverts commit 69fc9e594e6d5da87bff42707973683f84b67c93. Conflicts: src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qrasterizer.cpp (cherry picked from commit f8e85838c5531b56c2175cbdb9c24db426f7fd89) Change-Id: I4f936404000e6fa88887d0fbe3fbde92c8edd259 Reviewed-on: http://codereview.qt.nokia.com/603 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix event delevery orderOlivier Goffart2011-06-271-2/+2
| | | | | | | | | | | | | | Some functions (such as QObject::moveToThread) did not keep the event ordered by priority. And because qUpperBound is used to add events, that mean new events would not be inserted in order. Task-number: QTBUG19637 Change-Id: I38eb9addb1cdd45b8566e000361ac6e5f1f2c2b8 Reviewed-on: http://codereview.qt.nokia.com/733 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Store styleName in font databaseJiang Jiang2011-06-273-12/+38
| | | | | | | | | | | | | | | | So that queries like QFontDatabase::styles() can return exactly the same styles as the system does. Then application can use QFont::setStyleName() to select those styles later. With a lot of fonts not providing correct numeric weight/width values and even if they did, values are usually not directly mapped to QFont enums, styleName is probably the only reliable way to select any possible font in the system. Reviewed-by: QTBUG-13518 Change-Id: Id8a9469b804f1b5bb81d8c7378e7e8778f9a4fff Reviewed-on: http://codereview.qt.nokia.com/739 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add styleName to QFontDef comparisonJiang Jiang2011-06-272-0/+4
| | | | | | | | | | | To make sure we cache different font engines with different style names. Task-number: QTBUG-19366 Change-Id: Iefaebd5418f212ff759e03c1745f839a7f23d013 Reviewed-on: http://codereview.qt.nokia.com/738 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* fix autotest regressions introduced by 37c329a3Lars Knoll2011-06-222-0/+86
| | | | | | | | | | | Add proper license headers and properly clip pixel drawing to the devices bounding rect. (cherry picked from commit 67d275542464c794ec4b650f10cca9a17e10c977) Change-Id: I52a166919e87e07168fa5f597b22398a1abefe14 Reviewed-on: http://codereview.qt.nokia.com/590 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QPoint have the same layout on all platformsGunnar Sletta2011-06-202-14/+0
| | | | | | | Change-Id: I8330295761a4440afd81c121039237fb651d9a9c Reviewed-on: http://codereview.qt.nokia.com/487 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix fontconfig usage in X11 font databaseJiang Jiang2011-06-222-52/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a FcPattern for query because the family list in it will contain almost all the families after FcConfigSubstitute(0, pattern, FcMatchPattern), then the test in <match target="font"> will almost always succeed. In general, FcMatchFont substitute should only be done on the FcPattern that we got after FcFontMatch() or FcFontRenderPrepare(). Based on the suggestion of fontconfig author Behdad Esfahbod, this patch reorganized the tryPatternLoad logic so that it only does the QFontEngine creation part, FcPattern *match is retrieved outside of that function. In this way, the match pattern we got can be either from FcFontMatch() or after FcFontRenderPrepare() on one of the fonts we got from qt_fontSetForPattern(). Then we don't need to duplicate the pattern and add all criterias back with qt_addPatternProps(). It not only simplified the code a lot but also fix the way we apply FcMatchFont substitution. This substitution will either be done by FcFontMatch() or FcFontRenderPrepare, both implicitly. Task-number: QTBUG-2148, QTBUG-19947 Change-Id: I2e4dbbe7f448e81850176732b4a65028f2b912fa Reviewed-by: Eskil Reviewed-on: http://codereview.qt.nokia.com/579 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Support -qtnamespace and -qtlibinfix againLiang Qi2011-06-205-6/+18
| | | | | | | | | | | | This fix is for qtbase libraries with -qtnamespace and -qtlibinfix options in configure. Task-number: QTBUG-19964 Change-Id: I2f2ff1748f2c1c2b20d5f73b6be36f68a7a26cef Reviewed-on: http://codereview.qt.nokia.com/505 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix empty lines in Qt HTML when displayed in external browsers (again)Eskil Abrahamsen Blomfeldt2011-06-203-4/+11
| | | | | | | | | | | | | | | | | This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which should be more compliant with different browsers. In particular, Outlook didn't support the CSS trick in the last fix, so we need the somewhat larger patch which adds an extra line break node to the tree and then ignores it when re-importing the document. Task-number: QTBUG-3669 Reviewed-by: Simon Hausmann (cherry picked from commit cb760eaef631abd49836ae5c8dc12a61ef5eff0d) Change-Id: Ia55bf39d52461aa9445a9a5d0bfb5b4c5bf1e9bd Reviewed-on: http://codereview.qt.nokia.com/492 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix bug which caused repeated characters in a QML TextEskil Abrahamsen Blomfeldt2011-06-201-2/+2
| | | | | | | | | | | | We would include too much in the characters displayed, since itemEnd is actually the start of the next item and not the end of the current one. Adding a minus one removes the duplicated characters at the end of text lines. Change-Id: I1e13470548fafaa692ae58e019e9e2469a947f5e Reviewed-on: http://codereview.qt.nokia.com/495 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>