summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Make it possible to set color of QStaticText with pixel size >= 64Eskil Abrahamsen Blomfeldt2011-06-201-1/+1
| | | | | | | | | | | | | | | | | Adding the fallback to QPainterPath for large QStaticTexts created a regression where all text would be painted in black regardless of the color you set on it. The color in QStaticTextItem is sometimes invalid, in which case the current painter color should be used. In either case, the color is already set on the current pen when entering drawStaticTextItem() so we can just use that. Task-number: QTBUG-19950 Reviewed-by: Jiang Jiang (cherry picked from commit ee77ee5c25f58271e6f2863225d08573da86c3ee) Change-Id: I955aa6526e5b14589430f8dccd006a9de9ae08c9 Reviewed-on: http://codereview.qt.nokia.com/491 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Initialize member variable.Gunnar Sletta2011-06-141-1/+2
| | | | | | | Change-Id: Ica42c77614fa4fa9ae7692e00d3fc796219aacdc Reviewed-on: http://codereview.qt.nokia.com/466 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix a case of SP_MediaSkipForward returning the wrong pixmap.Andy Shaw2011-06-101-1/+1
| | | | | | | | | | | | | This fixes QTBUG-18311. Merge-request: 2621 Reviewed-by: Joao (cherry picked from commit a9364af090fd3209b92ed5e07a1374488d22b1c4) Change-Id: I0a0fc99060c64a9aab395a183f2faf9223e9a925 Reviewed-on: http://codereview.qt.nokia.com/449 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fix missing empty lines in Qt HTML when displayed in compliant browsersEskil Abrahamsen Blomfeldt2011-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | When QTextDocument exports HTML, it makes an effort to be compatible with its own importer, hence it has to be compatible with the dialect of HTML which Qt has developed over the years. One incorrect interpretation in Qt is that an empty paragraph is interpreted as an empty line. So if you use a QTextDocument to produce HTML for text where an empty line has been added, this empty line will not be visible when the document is viewed in a compliant browser. The fix is to set the height of the empty paragraph to 1em, so that it will match the current pixel size of the font, thus look the same as a <p><br /></p> but without altering the structure of the document. Reviewed-by: Gunnar (cherry picked from commit f541c78e1bc5b293466b40e6f10496199a4a5d73) Change-Id: Ic0eae2c81609b8872eb2eb9344a3ec416cd09149 Reviewed-on: http://codereview.qt.nokia.com/445 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fontengine buildfix for xcb platform plugin.Tapani Mikola2011-06-104-11/+7
| | | | | | Change-Id: Ic909e1ac08163e62634643c68862e802a016b911 Reviewed-on: http://codereview.qt.nokia.com/442 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Allow selecting fonts with irregular style namesJiang Jiang2011-06-0911-96/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black Condensed" can't be selected in Qt because either they don't report correct numeric values for weight/stretch/etc. or these values are not mapped from QFont enums in a linear way. Thus we provide a shortcut to select these fonts with PostScript name or full name without resorting to family name matching in QFontDatabase (these fonts are not registered in font database anyway). After this, we can simply use: QFont font("Helvetica Neue"); font.setStyleName("UltraLight"); to select these fonts. QCoreTextFontEngineMulti matched like this can be created directly from the CTFontRef instance instead of creating from the font name, making this process faster. The commit also cleaned up the font loading process in Mac font database a bit, moving the code for family matching into a separate function. Add QFontInfo::styleName() and QRawFont::styleName() to access the resolved style name for a font. Task-number: QTBUG-19366 Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506 Reviewed-on: http://codereview.qt.nokia.com/333 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Duplicate some harfbuzz symbols inside Qt.Gunnar Sletta2011-06-094-3/+115
| | | | | | | | | | | | | | | This is done to remove a compile-time dependency on the harfbuzz source files inside qtbase/src/3rdparty. These are not accessible now that QT_SOURCE_TREE is not accessible as a qmake variable anymore. With the refactor branch we might solve this differently, but for now this is how we get svg and declarative to compile. Change-Id: I5dad23f2ea1f650e2621c1c1fcf39632a3a22ae8 Reviewed-on: http://codereview.qt.nokia.com/378 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Use homePath instead of homeDirPathEckhart Koppen2011-06-091-1/+1
| | | | | | | | | | homeDirPath requires Qt 3 support, which is not enabled in all configurations. Change-Id: I7d51b880574021ef4569a4a2b16f06a7786dbb7d Reviewed-on: http://codereview.qt.nokia.com/415 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add tilde (both ~ and ~<user>) expansion to QFileDialog on UNIX.Pierre Rossi2011-06-081-4/+73
| | | | | | | | Task-number: QTBUG-3265 Change-Id: Id8062afe69e798e1f9cf3f4e967ae0d30c362b72 Reviewed-on: http://codereview.qt.nokia.com/411 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix modules to load(qt_module) firstMarius Storm-Olsen2011-06-081-0/+2
| | | | | | | Change-Id: Iabdfffff09088243863a8661add73298ed8baaf3 Reviewed-on: http://codereview.qt.nokia.com/413 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Reorder member varibles in QGlyphRunPrivate to eliminate warningJiang Jiang2011-06-081-4/+4
| | | | | | | | | | Reviewed-by: Eskil (cherry picked from commit 74a1135341783449970d579b273d00c837ac14b0) Change-Id: I8e1c6bdc7f0957d8f389531f5f5682c536cdc286 Reviewed-on: http://codereview.qt.nokia.com/374 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix warning in qtextengine compilationJiang Jiang2011-06-081-1/+1
| | | | | | | | | | | | enableHarfbuzz() should only be defined on Mac. Reviewed-by: Eskil (cherry picked from commit 5ce3fbb67b79c3732fd47b296ef9421398ca520c) Change-Id: I9ecb5db49478c3f5beb5d41cf99320f0faedce2e Reviewed-on: http://codereview.qt.nokia.com/375 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix compile when configure with no fontconfig supportJiang Jiang2011-06-081-3/+3
| | | | | | | | | | | Task-number: QTBUG-19716 Reviewed-by: Eskil (cherry picked from commit 5a598afa3f1928e9ad18257e2fa48fe3d5739917) Change-Id: I05107970e3273fce48303c9956e1c9aa928832b9 Reviewed-on: http://codereview.qt.nokia.com/376 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add function QGlyphRun::setRawData()Eskil Abrahamsen Blomfeldt2011-06-076-53/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | To provide an optimized way of constructing QGlyphRun objects with no copying or allocation, we add function setRawData() (naming inspired by QByteArray::setRawData()). Data retrieved from QRawFont can be passed directly into this. The logic is now that the data pointers in QGlyphRunPrivate should always point to the current valid data and is what will be used in comparisons and drawing calls. The vectors are optimizations to avoid unnecessary copying if the user wants to use the QVector based API (which makes it easier to manage the memory.) This reflected in the functions that return QVectors, which will return the stored vector if and only if it is identical to the current pointer. Otherwise we will have to copy the memory. The internal addition operators in QGlyphRun have been removed since they really provide no real optimization and have an unclear definition if the two glyph runs are based on different fonts. Reviewed-by: Jiang Jiang (cherry picked from commit 86d88c5b719fd3d50336d9d8e7127b8045ee82ae) Change-Id: Id5bb55ee3d93afb32ffca850f53382e856df7b3e Reviewed-on: http://codereview.qt.nokia.com/342 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Moved common module profiles to be feature profiles.axis2011-06-051-1/+1
| | | | | | | | | | This enables external modules to also make use of them without having access to the complete QtBase source code. Change-Id: I056e45cba6c6798b76670b8d238dadb2d9f9c092 Task: QTBUG-19585 Reviewed-on: http://codereview.qt.nokia.com/234 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Correct antialias disabling logic for Core TextJiang Jiang2011-06-041-3/+2
| | | | | | | | | | We should always turn antialias off when QFont::NoAntialias being passed in styleStrategy. That corrects some QStaticText tests. Change-Id: Iaffc5f3bb7f501dcb648cab41a8b6ffcf93f90ae Reviewed-on: http://codereview.qt.nokia.com/328 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix Windows buildJiang Jiang2011-06-031-2/+2
| | | | | | | Change-Id: Ieafe2cefe0dcb00a3b22133506fb854428abff5e Reviewed-on: http://codereview.qt.nokia.com/320 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Refactor glyph pretransform checkJiang Jiang2011-06-036-56/+62
| | | | | | | | | | | | | | | Move paintEngineSupportsTransformations logic from QPainter to paint engine subclasses. Simplify and consolidate checks for cached drawing (pretransformed) and path drawing (untransformed) in raster paint engine. Fix unnecessary transform when paint engines actually take the path drawing track. Fix scaling and rotation transform in raster engine for Mac. Task-number: QTBUG-19086 Change-Id: I1c0c1800a5173d3db765b9fccfd0e7a3628e3815 Reviewed-on: http://codereview.qt.nokia.com/298 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Make TextEdit word selection more natural.Andrew den Exter2011-06-011-1/+1
| | | | | | | | | | | | | | | QTextControl will only extend the selection to a word if the cursor is directly over it which prevents the selection being extended if the mouse is dragged up or down a to a shorter line of text making it difficult to select multiple lines of text. Just disable that limitation when the TextEdit word selection is enabled. Change-Id: I3b9d1575c0141db8441197d740de94a90eacc077 Task-number: QTBUG-19230 Reviewed-by: Martin Jones Reviewed-on: http://codereview.qt.nokia.com/292 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Ensure the TextEdit cursor delegate is repositioned on mouse events.Andrew den Exter2011-06-011-1/+3
| | | | | | | | | | | | Update the micro focus when a mouse press changes the cursor position of a read only TextEdit. Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46 Task-number: QTBUG-19109 Reviewed-by: Martin Jones Reviewed-on: http://codereview.qt.nokia.com/291 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Don't crash on an invalid replacementStart from an input method.Andrew den Exter2011-06-011-1/+3
| | | | | | | | | | | | | Ensure the cursor position does not exceed the bounds of the current text. Change-Id: If38f7729372562324d11eadd1a976c0c6da91863 Task-number: QTBUG-19054 Reviewed-by: Martin Jones (cherry picked from commit 6fbfb1ab3f26ad672eb24f9b4a0ce1a8eea08298) Reviewed-on: http://codereview.qt.nokia.com/290 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix build in C++0x modeBernhard Rosenkraenzer2011-05-313-8/+8
| | | | | | | | | | | | | | | | | | | | | This fixes compiler errors (gcc 4.6 -std=gnu++0x on x86_64 Linux): embedded/qwslock.cpp: In function `bool forceLock(int, int, int)': embedded/qwslock.cpp:121:39: error: narrowing conversion of `semNum' from `int' to `short unsigned int' inside { } [-fpermissive] (and equivalent errors in other lines/files) See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf Section 8.5.4/6 Change-Id: I2cbac5482b87f33287a416af5a5c9bde621720bc Reviewed-By: Olivier Goffart Merge-Request: 1240 Reviewed-on: http://codereview.qt.nokia.com/275 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Support placing cursor in ligature with mouse or touchJiang Jiang2011-05-303-7/+82
| | | | | | | | | | | | | | | | | We need to find out the closest element in the ligature to the point we clicked (or tapped), currently we do this by dividing the width of that ligature glyph evenly by the number of characters it covered. We only support Common and Greek script at this point, ligatures in other scripts are still handled as a whole. Task-number: QTBUG-19260 Reviewed-by: Eskil (cherry picked from commit 5338d78aa9d80ddd2bcb21e6b22cd2cf1522a7d3) Change-Id: Ic747e9458d561aca0848dcd1e8b94e0a23fd8189 Reviewed-on: http://codereview.qt.nokia.com/196 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix ligature offset in multi-line textJiang Jiang2011-05-271-2/+2
| | | | | | | | | Reviewed-by: Eskil (cherry picked from commit 278cf1f37945050c4a46d5acab0659f3a7546a43) Change-Id: Ice20aa38a49ea16cf56bd3705c7d400ee165a9c2 Reviewed-on: http://codereview.qt.nokia.com/195 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix compile for systems with old fontconfigJiang Jiang2011-05-271-0/+5
| | | | | | Change-Id: Ia26796bdbab7988d14163d3c1290111c0cb22bf7 Reviewed-on: http://codereview.qt.nokia.com/182 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix infinite recursion when changing geometry on MacGabriel de Dietrich2011-05-261-7/+5
| | | | | | | | | | | | Some complex widgets might get a negatively sized rectangle when calling QWidgetPrivate:setGeometry_sys_helper(), triggering a infinite recursion. Normalizing the rectangle size before checking for size change is enough to break this infinite recursion. Task-number: QTBUG-17333 Change-Id: I4682c3088ea53fb9f28f746c8264f573b5284825 Reviewed-on: http://codereview.qt.nokia.com/156 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Fix QGLWidget::renderPixmap for raster engine on MacJiang Jiang2011-05-251-2/+9
| | | | | | | | | | | | | | The QPixmap buffer is backed by QRasterPixmapData instead of QMacPixmapData for the raster engine, thus we have to update qt_mac_pixmap_get_base() and qt_mac_pixmap_get_bytes_per_line(), so that QGLWidget can locate the offscreen buffer from a QPixmap. Reviewed-by: Fabien Freling (cherry picked from commit c5846314dfd80e7f7f32ba737f1884dcccbbd80d) Change-Id: I2414222f8a59e02c778177d52ad9a6e0ff68668d Reviewed-on: http://codereview.qt.nokia.com/123 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Workaround a bug in Core Text to select Light fontsJiang Jiang2011-05-251-1/+6
| | | | | | | | | | | | | | | | | | | | | Currently in Core Text there is not proper way to select fonts with Light weight, for example: QFont font("Helvetica"); font.setWeight(QFont::Light); will give you Helvetica-Light, as with: QFont font("Helvetica"); font.setWeight(QFont::Normal); because of a bug in Core Text, applying 0 symbolic traits with CTFontCreateCopyWithSymbolicTraits will always return the Light variant of that font family. Thus, we should only do this unless symbolicTraits is not 0 or font.weight is not Normal (Light is not a symbolic trait, but CT doesn't support selecting Light weight numerically). Reviewed-by: Eskil (cherry picked from commit 4d5b8f66d82e9087d9d58a4e76e6b46ce7bb53cc) Change-Id: I37a970aba5019a13b9f3bc43b7fb594b74a1aa37 Reviewed-on: http://codereview.qt.nokia.com/124 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix QFontEngineX11FT compilationJiang Jiang2011-05-251-0/+2
| | | | | | | | | | | xglyph_format is only available when XRender is present. Reviewed-by: Fabien Freling (cherry picked from commit a6642e4659b3d45ffa94f9a3c6413124d49f2b91) Change-Id: Ibd767c5055c8fb4a7d28ace141f6713f4367d1ba Reviewed-on: http://codereview.qt.nokia.com/113 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Compile. Morten Sorvig2011-05-251-13/+0
| | | | | Change 0748751c brought in an extra copy of this function.
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241246-21159/+21159
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Doc: Added some details to the accessibility events API documentation.David Boddie2011-05-231-36/+95
| | | | Reviewed-by: Frederik Gladhorn
* Doc: Fixed qdoc warnings.David Boddie2011-05-234-41/+60
|
* Doc: Fixed qdoc warnings.David Boddie2011-05-232-7/+10
|
* Doc: Fixed qdoc warnings.David Boddie2011-05-231-4/+4
|
* Doc: Fixed qdoc warnings.David Boddie2011-05-2324-145/+177
|
* Squashed commit of the changes from the mobile-examples repositoryDavid Boddie2011-05-232-1/+14
| | | | (4.7-generated-declarative branch).
* Enablers for TextInputEskil Abrahamsen Blomfeldt2011-05-238-23/+126
| | | | | | | In order to use the scene graph text node in TextInput, we need enablers. Most of this is to enable selections, which in turn means we need to be able to extract a certain set of glyphs from a QTextLine.
* Full translucent background support in xcb and xlib backend.Samuel Rødal2011-05-191-2/+9
| | | | | | | | | Make sure to pick an alpha visual also for non-GL surface types, and to ask for alpha in the window format if the WA_TranslucentBackground attribute is set. Reviewed-by: Janusz Lewandowski (cherry picked from commit 6241e39cff9311c943430ff2f31236b13618f2ac)
* Remove warning from QColor::setNamedColor().Samuel Rødal2011-05-191-2/+1
| | | | | | | | | | | This warning is pointless as the user can anyway check if the color is valid after making the call by calling isValid(). Using isValidColor() could be used but it has a big performance overhead as validation then needs to be done twice. Task-number: QTBUG-19098 Reviewed-by: Erik Verbruggen (cherry picked from commit a423ff5474b89028eeca95b254f5184311c8223b)
* Fixed compile of qdrawhelper_neon.cpp.Samuel Rødal2011-05-191-1/+1
| | | | | | | | We need to use the quad-word intrinsic and reinterpret the cast to a signed int vector. Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com> (cherry picked from commit d2d7aef223a3bad368c6b7c7f7f4617f4acf323c)
* Always call XInitThreads.Gunnar Sletta2011-05-191-2/+2
| | | | | | | | | Any Qt application that embeds a QSGView needs to call this because of the threaded renderer. Today applications that use threaded GL silently fail. In a few weeks time, the refactor branch will be merged, which will obsolete this change, so it is a temporary measure to get tests and examples running.
* Fall back to using paths for large fonts in drawStaticText()Eskil Abrahamsen Blomfeldt2011-05-183-3/+46
| | | | | | | | | | | | | | QStaticText had an implicit risk which meant you had to make sure the text size did not grow unreasonably large. This was intended to avoid hiding the performance impact of using QStaticText for such a purpose, but it's too inconvenient. Thus, the same fall back as in drawTextItem() has been introduced. This will also fix a bug recently introduced when we started using the FT cache to draw static text in the raster engine, since this will fail for large fonts. Task-number: QTBUG-19084, QTBUG-19370 Reviewed-by: Jiang Jiang (cherry picked from commit 0aa9b30432cec3b7f366983f451fc9a7f8f83243)
* Fix broken drawing with large fonts using QStaticText and FreeTypeEskil Abrahamsen Blomfeldt2011-05-181-1/+1
| | | | | | | | | | | | | In FreeType, there's a fall back to QFontEngine::alphaMapForGlyph() when the fonts are very large. Since this uses a QPainterPath containing an unhinted glyph, the use of hinted metrics would sometimes lead to the glyphs being clipped because they would be positioned slightly outside the image they were painted into. When outline drawing is on, it makes sense to return unhinted metrics, since the glyphs we will actually use are unhinted. Task-number: QTBUG-19067 Reviewed-by: Jiang Jiang
* fix compilation with namespacesLars Knoll2011-05-121-8/+8
| | | | | Reviewed-by: Bjørn Erik Nilsen (cherry picked from commit 7a1c29f101b95c9cc2cb53f8b80d231b5a994a9a)