summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-11-143-25/+34
|\ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Remove font that may not exists in some OS X systems Fix regression in styleName searching Fix styleName listing with the same QtFontStyle::Key value Fix localized font family access in OS X
| * Fix regression in styleName searchingJiang Jiang2011-11-092-24/+10
| | | | | | | | | | | | | | | | | | 1. Faked styles should have styleNames as well otherwise we couldn't find them. 2. With a QtFontFoundry mixed with style keys and style names, there is no way to sort them in a manner than binary search will work, we have to use linear search instead.
| * Fix styleName listing with the same QtFontStyle::Key valueJiang Jiang2011-11-081-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should store fonts with different style names but the same QtFontStyle::Key value (italic, weight and stretch) separately, so that fonts like Osaka (Regular, Regular-Mono) can be listed correctly. dd0205e0fbacf340508686cc136d70eda7bf664d introduced this regression when moving styleName out of Key. Without a styleName specified, we will do binary search and insertion for styles by comparing QtFontStyle::Key. We should do the same but comparing styleName instead when it's available. Reviewed-by: Eskil
| * Fix localized font family access in OS XJiang Jiang2011-11-082-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Font family names listed in QFontDatabase::families() should be localized names rather than their default (English) names, to be consistent with behaviors in other Mac apps and previous Qt/Mac based on ATS. It should also be possible to verify if a font exists with any family name, regardless it's localized or not. Say we have font "Hiragino Mincho Pro", which has a Japanese name called "ヒラギ ノ明朝 Pro", then db.hasFamily(QString::fromUtf8("ヒラギノ明朝 Pro")) should return true. Task-number: QTBUG-22372 Reviewed-by: Morten Sorvig
* | Fix QPlainTextEdit when using Qt::TextSelectableByKeyboard flagjahonkon2011-11-111-5/+2
|/ | | | | | | | | It is not possible to select text with keyboard when specifying only Qt::TextSelectableByKeyboard flag. Task-number: QTBUG-18952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QFont related compilation errors on Mac OSX CarbonSamuli Piippo2011-11-012-3/+3
| | | | | | | Task-number: QTBUG-22318 Merge-request: 1434 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Merge branch '4.8-upstream' into master-waterWater-Team2011-10-173-5/+5
|\
| * Merge remote-tracking branch 'qt/4.8'Sami Lempinen2011-10-141-1/+1
| |\
| * | Converting from double to qreal in guimread2011-10-103-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a number of places in QtGui where doubles were used in expressions due to the use of floating point constants in the code. Many of these constants are now constructed as qreal, removing the use of double operations where unneeded. These changes have been limited to constants that have exactly the same value whether double or float, to ensure that precision errors are not introduced. This should not affect any of the desktop platforms where qreal is double. On Symbian, where qreal is float, appropriate autotests have been run. Task-number: QTBUG-4894 Reviewed-by: Sami Merila
* | | fix possible race conditionsKonstantin Ritt2011-10-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | the initialization guard must be set after the initialization is done; for the code assumed to be only executed in a single thread, this change was done just for consistency - in order to avoid similar issues by copy-pasting in future Merge-request: 2655 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
* | | QTBUG-21058: Fix for possible crashes in QTextControl::setCursorWidth()Mikko Knuutila2011-10-041-4/+4
| |/ |/| | | | | | | | | | | | | | | Cursor's width is now queried from the style only when the user calls cursorWidth(). Earlier it was queried already in the ctor, which caused crashes if the application was guiless. Merge-request: 2697 Reviewed-by: Jan-Arve Saether <jan-arve.saether@nokia.com>
* | Fix possible crash in QFontEngineFTEskil Abrahamsen Blomfeldt2011-09-261-1/+1
|/ | | | | | | Avoid crash if set pointer is null. Task-number: QTBUG-21647 Reviewed-by: Jiang Jiang
* Merge remote-tracking branch 'qt-mainline/4.8'aavit2011-09-221-6/+9
|\ | | | | | | | | Conflicts: dist/changes-4.8.0
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-09-201-6/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fixed automatic plugin path resolving for predefined Qt plugins. Resolve a number of compilation issues with INTEGRITY Fix compile issue when building with QT_NO_CONCURRENT and QT_NO_FUTURE
| | * Resolve a number of compilation issues with INTEGRITYRolland Dudemaine2011-09-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, #ifdef'ed out getpwuid_r() and getpwgid_r() usage since users/groups support is not in in single-process Posix mode. Also, correct a typo and add missing files to io.pri. Update documentation to disable libtiff which won't compile until ibtiff itself is updated, and add back -no-exceptions in the sample command line. And add a line to compile host tools. Add a dummy QT_OPEN_LARGEFILE definition in qplatformdefs.h since there is code that requires it. Move definition of getGlyph() after the definition of qHash(GlyphAndSubPixelPosition). Merge-request: 2686 Reviewed-by: ossi
* | | Only limit cursor position when line is wrappedJiang Jiang2011-09-211-1/+1
| | | | | | | | | | | | Reviewed-by: Eskil
* | | Make sure cursor position doesn't exceed line endJiang Jiang2011-09-191-0/+3
|/ / | | | | | | | | | | | | | | | | If we have trailing spaces at the end of a line, cursor will disappear because the position we returned exceeds line end, thus the widget border. By limiting it within line.width we can make sure it always visible, which is more consistent to the behavior in common platforms. Reviewed-by: Eskil
* | Merge remote branch 'qt-mainline/4.8'aavit2011-09-1714-93/+54
|\ \
| * \ Merge remote branch 'origin/4.8' into 4.8-from-4.7Rohan McGovern2011-09-1482-2332/+9603
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine_p.h src/network/ssl/qsslsocket_openssl.cpp
| | * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-09-1011-177/+135
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Disable autotest broken by the change to QCache in 7ab0bed Generate glyphs in un-transformed coordinate system. Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFT Reset trailingSpaces in relayout Prevent QPixmapCache potentially growing indefinitely. Allocate 16-byte aligned memory independent of platform for raster pool. Fix trailing spaces problem by not adding it to QScriptLine.length Fix RTL layout for fonts when non-printable character has an advance Fix regression in tst_qrawfont Make it compile on mac Fixed compiling error in qvfb. micro optimizations fix "comparison between signed and unsigned" warnings on windows, don't resolve the gdi32's symbols for each QRawFont instance fix typo in the docs QRawFont: add missed operator != optimize QGlyphRun's operator == a bit QGlyphRun: make operator != inlined QGlyphRun: don't detach if the decoration wasn't actually changed QPA event loop: Set a timeout != 0 if there are no timers.
| | * \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging into ↵Qt Continuous Integration System2011-09-091-5/+2
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-qml-staging: Fix double click and drag not extending word selection.
| | | * | Fix double click and drag not extending word selection.Andrew den Exter2011-09-081-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mousePressed isn't set on the second press of a double click and so can't be used to determine if all selections should be skipped. Instead skip only the single click and drag selections if mousePressed is false. Change-Id: I5e7ba033f38b0f9b98fdca5c61a8548f92991601 Task-number: QTBUG-20925 Reviewed-by: Martin Jones
| | * | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-09-0813-88/+52
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Split CFLAGS from pkg-config properly Ensure that the proxystyle is used over the style's own functions runonphone: Add a missing space between a message and the file name Perl check for windows configure. QSettings: don't assume XDG_CONFIG_HOME is latin1-encoded QSettings: use the common appdata dir when bootstrapping qmake on win Replace explicit surrogate handlers by inline methods of QChar class
| | | * | | Replace explicit surrogate handlers by inline methods of QChar classsuzuki toshiya2011-09-0713-88/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1284 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | | | | Release font engine refcount when done using it in QTextEngineJiang Jiang2011-09-093-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5f2b6dd2a50275bc05ae5d7e9dd8902d6d49d9df increased refcounts for font engines in QTextEngine cache, we need to decrease them when the QTextEngine is deallocated. Task-number: QTBUG-21222 Reviewed-by: Eskil
* | | | | | Release font engine refcount when done using it in QTextEngineJiang Jiang2011-09-163-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5f2b6dd2a50275bc05ae5d7e9dd8902d6d49d9df increased refcounts for font engines in QTextEngine cache, we need to decrease them when the QTextEngine is deallocated. Task-number: QTBUG-21222 Reviewed-by: Eskil
* | | | | | Do not put cursor at non-stop character positionsJiang Jiang2011-09-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When moving cursors, non-stop positions are skipped, however certain input sequences can still lead us there. In such cases we should simply ignore those positions in cursorToX. Task-number: QTBUG-7076 Reviewed-by: Eskil
* | | | | | doc: Fix incorrect enum name in QRawFont::alphaMapForGlyph docsEskil Abrahamsen Blomfeldt2011-09-131-1/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no QImage::Format_A8 format. This is a term used in the corresponding QFontEngineGlyphCache enum. Reviewed-by: Jiang Jiang
* | | | | Use QT_MAX_CACHED_GLYPH_SIZE in QFontEngineFTAleksandar Stojiljkovic2011-09-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-21162 - Letters get truncated when font size=72 and set to Italic Reviewed-by: Eskil
* | | | | Reset trailingSpaces in relayoutJiang Jiang2011-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: TrustMe
* | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-teamaavit2011-09-083-5/+6
|\ \ \ \ \
| * | | | | Fix trailing spaces problem by not adding it to QScriptLine.lengthJiang Jiang2011-09-083-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge remote-tracking branch 'qt-mainline/4.8'aavit2011-09-084-12/+31
|\ \ \ \ \ \ | |/ / / / / |/| | / / / | | |/ / / | |/| | | Conflicts: tools/qvfb/qvfbshmem.cpp
| * | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-09-071-0/+8
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: fix build for desktop Fix the build with -qtnamespace configure options
| | * | | Fix the build with -qtnamespace configure optionssuzuki toshiya2011-09-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Merge-Request: 1291 Reviewed-by: Liang Qi <liang.qi@nokia.com>
| * | | | Merge remote-tracking branch 'upstream/4.8' into qt-4.8-from-4.7Sergio Ahumada2011-08-3113-43/+94
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslcertificate.cpp
| | * | | Merge remote-tracking branch 'upstream/4.8'Sergio Ahumada2011-08-297-44/+56
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tools/qdoc3/cppcodemarker.cpp
| | * \ \ \ Merge remote-tracking branch 'mainline/4.8'Oswald Buddenhagen2011-08-267-12/+42
| | |\ \ \ \
| | * \ \ \ \ Merge remote-tracking branch 'mainline/4.8'Oswald Buddenhagen2011-08-184-20/+33
| | |\ \ \ \ \
| | | * \ \ \ \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-08-161-17/+25
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Minor optimizations for QTextEngine
| | * | | | | | | Add support for rawFonts loaded from data in FaceIdPierre Rossi2011-08-152-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>
| * | | | | | | Merge branch 4.7 into qt-4.8-from-4.7Sergio Ahumada2011-08-311-11/+19
| |\ \ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/index.qdoc
| | * | | | | | Make text rendering working outside the gui thread on Symbian.Laszlo Agocs2011-08-301-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was previously not possible to render text (QPainter::drawText) in a secondary thread on Symbian, it always resulted in some kind of panic. This patch corrects it. For S60 5.0 and earlier the behavior is not changed, threaded text rendering is only supported on Symbian^3 and newer. This also means QFontDatabase::supportsThreadedFontRendering() will return true from now on, but only on Symbian^3 and higher. Task-number: QTBUG-18516 Reviewed-by: mread (cherry picked from commit 0c62e02b80570bf8b92eff7acceb9018df61c89e) (cherry picked from commit 13e7d402c438fd2c527dbc302cf1103d5c835a2f) Reapplied after bad v4.7.4 merge
* | | | | | | | Fix RTL layout for fonts when non-printable character has an advanceJohn Tapsell2011-09-082-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a non-printable character has an advance, we would lay out the text as if the character was part of the output, and then ignore the character later when the text was rendered. To fix cases such as this, we take the dontPrint attribute into consideration when adjusting the advances. Task-number: QTBUG-21347 Reviewed-by: Eskil Reviewed-by: Lars
* | | | | | | | Fix regression in tst_qrawfontEskil Abrahamsen Blomfeldt2011-09-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 4d8cd11179e6cca162efe650d308124dc7aefb14 broke QRawFont on Windows by removing some code. After the font has been renamed, we need to use the new font tables rather than the old ones for registering the font in the system. Reviewed-by: aavit
* | | | | | | | Make it compile on macaavit2011-09-071-3/+3
| | | | | | | |
* | | | | | | | micro optimizationsKonstantin Ritt2011-09-024-109/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use an inlined version of isValid() everywhere; don't detach where is non required; get rid of extra checks where possible Merge-request: 1343 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | | | | | | | fix "comparison between signed and unsigned" warningsKonstantin Ritt2011-09-021-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1343 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | | | | | | | on windows, don't resolve the gdi32's symbols for each QRawFont instanceKonstantin Ritt2011-09-022-37/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1343 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | | | | | | | fix typo in the docsKonstantin Ritt2011-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1343 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>