summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontmetrics.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Delete links to removed examplesAndreas Eliasson2023-08-181-1/+1
| | | | | | | | | | The examples have been removed as part of the examples revamp project. This patch resolves a number of qdoc warnings. Pick-to: 6.6 6.5 Change-Id: Ie3d2f5637136c631d7e9f7a8ffd93baea52f77d8 Reviewed-by: Kai Köhne <kai.koehne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Warn that computational time follows length of text inputAllan Sandfeld Jensen2023-02-141-2/+4
| | | | | | | | | | We have no reliable way of cutting the text shorter without side- effects, so leave that to the users. Pick-to: 6.5 Task-number: QTBUG-109838 Change-Id: I280d2dec9d6e0cd6b4d57edac231ae99420d8569 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Avoid unneccessarily long text scansAllan Sandfeld Jensen2023-01-311-14/+20
| | | | | | | | | | Limit the scans to the processed length. Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-109838 Change-Id: If4b19bf6f97d788d0a227af3a80962bef26016fd Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* doc: Clarify the term advance widthEskil Abrahamsen Blomfeldt2022-09-081-3/+11
| | | | | | | | | | | | | | The QFontMetrics documentation has been wrongly stating that the the horizontalAdvance() gives the width of a string, dating back to when the function was misnamed as width(). This can cause issues e.g. when using the value as input to eliding or clipping, since the advance may be smaller than what is actually drawn. This tries to clarify the term a bit. Task-number: QTBUG-90036 Change-Id: I8ed82fa14fe26c2a20cdbee9f2097a0aa4cc3925 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add QFontMetricsF methods taking text options into accountAllan Sandfeld Jensen2021-10-221-6/+194
| | | | | | | | | | This is needed by Qt Quick to be able to calculate font metrics using design metrics matching Quick text rendering. Task-number: QTBUG-85936 Task-number: QTBUG-94023 Change-Id: I67c74e2a912bd58df7a57349a858f20f04609f0f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't judge other people's writing systemsVolker Hilsheimer2021-04-081-10/+8
| | | | | | Pick-to: 6.1 6.0 5.15 Change-Id: Ifb8265bad4c8c96c6b20f957c376cec47e28f666 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Explain how boundingRect handles null QRectFPaul Wicking2021-01-111-1/+3
| | | | | | | Fixes: QTBUG-87107 Pick-to: 6.0 5.15 Change-Id: Ib7f9bd58b0f3454167dc61f95e0d8e6dec52a5ed Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove deprecated method from QFont, QFontMetrics, and QFontInfoVolker Hilsheimer2020-05-151-217/+0
| | | | | Change-Id: Ifc8fb5c5d53359b33b8abab3bbee3de61bfef539 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc/QtGui: replace some 0 with \nullptrChristian Ehrlicher2020-01-261-2/+2
| | | | | | | | | Replace some 'is 0' or 'are 0' where 0 referes to a nullptr with 'is \nullptr' and 'are \nullptr' Change-Id: Ic18d0c8bcf64159b4c8fae8c9499839954a98884 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-181-33/+37
|\ | | | | | | Change-Id: I12148e7b20bcdb72d9b328035d528c99633b1e92
| * Doc: Update text that refers to deprecated member function width()Paul Wicking2020-01-171-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add see also links from the deprecated function to the replacement. * Change introduction text to reflect new function name rather than the old and deprecated width(). * Change see also and inline references to width(), so that they now refer to horizontalAdvance(). Task-number: QTBUG-65141 Change-Id: Iadfbc517e5df96e32058516f8795bd210cc4c5e4 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-41/+41
| | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-4/+4
|/ | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/dev' into 5.14Liang Qi2019-08-271-6/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetrepaintmanager.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
| * QFont: remove unused member QFontPrivate::screenChristian Ehrlicher2019-08-221-6/+2
| | | | | | | | | | | | | | | | | | QFontPrivate::screen was not used anywhere so remove it. Change-Id: Ie9381d08b59b93c4e7bcaad58ebf1b389aa0a2e6 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Widget style: Use per-screen DPI in QStyleHelper::dpiScaled()Friedemann Kleint2019-08-231-1/+18
|/ | | | | | | | | | | | | | | | | Pass the style option to dpiScaled() in order to get the correct screen DPI. The style option contains the font, which again contains the current DPI value. Add QFontMetrics::fontDpi() accessors to get the DPI from the QFont. This DPI will/should be updated on screen change. Replace hardcoded Q_OS_MAC DPI with hardcoded base DPI. This makes per-screen DPI testable on macOS, too. Task-number: QTBUG-45055 Change-Id: I75f8b37d45eb50c3334b46b8469a546d29712f1b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix constness of QPaintDevice argumentsLuca Beldi2018-11-191-1/+30
| | | | | | | | | | | | QFont, QFontMetrics, QFontMetricsF and QTextLayout constructors use only const methods of QPaintDevice so there is no reason for them to require a non-const pointer argument Fixes: QTBUG-65967 Change-Id: Ibfcdef2a25f0cd4284dad76135fc4c9bf5667d7a Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Fix links to QFontMetrics::width() overloadsAaron Linville2018-02-131-2/+2
| | | | | | | | | Links to width(QChar) are incorrectly linking to QChar rather than to the intended QFontMetrics::width method. Task-number: QTBUG-65141 Change-Id: I1647885c735011ec3d99c535fdb8b7fc1bf57f99 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add QFontMetrics(F)::horizontalAdvance() functionEskil Abrahamsen Blomfeldt2017-11-141-22/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | A source of constant confusion is the QFontMetrics::width() function, which does not return the bounding width of the text, but the advance width. We deprecate this and add horizontalAdvance() instead, to avoid the confusion in the future. Note that there was an internal width() overload which was only there for the purpose of supporting the Qt::TextBypassShaping flag. This flag has already been replaced by public API, so no such overload is added. Instead, we deprecate the TextBypassShaping flag as well, which makes sense, since a replacement has been made. Also note that there was a consistency problem with QFontMetrics and QFontMetricsF, which are supposed to be interchangeable. The QFontMetrics::width() functions for strings took an optional int length argument, while the floating point version did not. This error is corrected in the advance() functions. [ChangeLog][QtGui][Text] Added QFontMetrics::horizontalAdvance() and QFontMetricsF::horizontalAdvance() to replace the confusingly named width() function. The latter has now been deprecated. Change-Id: I0dfda43aa65c8235be32c62fade82cae05b29c79 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add API to disable text shaping on fontsEskil Abrahamsen Blomfeldt2017-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | In the past, we had an undocumented text flag that worked with one of the QPainter::drawText() overloads. This was never intended as public API and served a specific cause in Qt WebKit at one point. But there is a general need for such API, as disabling shaping features easily gives 25% performance improvement on text rendering even for fairly short strings. This patch adds a new style strategy flag to disable shaping and will just uses the CMAP and HDMX tables to get glyph indices and advances for the characters. In Qt 6, the TextBypassShaping flag can be removed completely and be replaced by the style strategy. [ChangeLog][QtGui][Text] Added QFont::PreferNoShaping style strategy to support improvements to performance at the expense of some cosmetic font features. Task-number: QTBUG-56728 Change-Id: I48e025dcc06afe02824bf5b5011702a7e0036f6d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix clipping error on some RTL textEskil Abrahamsen Blomfeldt2017-01-311-6/+0
| | | | | | | | | | | | | | | | | | There was a false assumption that the bidi level of text is only used for visualizing the text, not for calculating its bounding box. But the bidi level is required for shaping (indeed many OpenType rules check for reading direction) and the glyphs used to represent a given text may be different based on its directionality. The effect would be that the bounding rect we calculated for text would sometimes be too small for RTL text, and we would end up clipping pixels. [ChangeLog][QtGui][Text] Fixed clipping errors and too small bounding rects for some right-to-left text. Task-number: QTBUG-48005 Change-Id: Idd12ae1b0033d518034b582204ba47ae41795293 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Added capHeight() to QRawFont and QFontMetrics(F)Konstantin Tokarev2016-08-151-0/+36
| | | | | | | | | | | | Cap height is an important metric of font, in particular it is required to make decent implementation of "initial-letter" CSS property in QtWebKit. Note that some fonts lack cap height metadata, so we need to fall back to measuring H letter height. Change-Id: Icf69d92159d070889085e20d31f2e397d796d940 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-181-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * Doc: Fixed Qt::TextWordBreak to Qt::TextWordWrapSamuel Gaist2016-02-151-2/+2
| | | | | | | | | | Change-Id: I0c50eab22c7ffaa7f39111b37979b92fd5c7f35f Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QFont*: fix some const-incorrectnesses involving QFontPrivateMarc Mutz2015-11-271-10/+10
|/ | | | | | | | | | | | Detected with a modified (deep const propagating) shared data pointer. Most are fixed by using copy constructor and assignment operator of the shared pointer instead of feeding it .data(). The rest required adding const locally. Change-Id: I51e36b9e7040dc2211ef4c5dadfbda73ad22c414 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Doc:added doc to undocumented functionsNico Vertriest2015-07-221-0/+5
| | | | | | Task-number: QTBUG-36985 Change-Id: Ic358682b276d67ef804f727bcf14191718613469 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* [QFontMetrics] Mark obsolete charWidth() method for deletion in 6.0Konstantin Ritt2015-06-251-0/+2
| | | | | | | | It was obsoleted for quite a while already and we forgot to get rid of it the last time. Change-Id: Ib15e71829e80648aa667a6b0af31698460b99cc1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-041-3/+0
| | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Doc: verb "to layout" changed to "to lay out"Nico Vertriest2015-01-161-4/+4
| | | | | | Task-number: QTBUG-43657 Change-Id: I574186253ee423cc380ec3c6f274f1caa2a6aa2a Reviewed-by: Martin Smith <martin.smith@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: Fix docs for QFontMetrics::height() to match codeEskil Abrahamsen Blomfeldt2014-06-231-4/+2
| | | | | | | | | | | | After cb8445f0323b0eefbb04f1d8adad81a00b53abd8, Qt no longer considers the baseline to have a vertical size, so it does not add an extra pixel to the font height. The documentation needs to be updated to reflect this. Task-number: QTBUG-39668 Change-Id: I28fc813e21d73bb03f7055b0f0843511a12d308b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Optimize glyph lookups with QFontEngine::glyphIndex(uint)Konstantin Ritt2014-03-051-90/+14
| | | | | | Change-Id: I56c7e727f3d9b08195f38939106620c744c6eaf0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Optimize stringToCMap() usageKonstantin Ritt2014-02-071-45/+116
| | | | | | | | | | | | CMAP guarantees there is 1:1 mapping between the Unicode code points array and the glyph indexes array, which means the QString length always greater than or equal to a sufficient glyph indexes array length. Simply add some asserts and improve the memory consumption and the performance where possible. Change-Id: I0bc8cdba5f86c1c0ba9e79c8d5f96cbe56ec463e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of QGlyphLayout::advances_yKonstantin Ritt2014-01-301-4/+4
| | | | | | | | | | | | | | | ...and thus consume 4 bytes less per glyph and increase the performance a bit. It seems, the only CTFontGetAdvancesForGlyphs() returns both x and y advances, though y advances are always equal to 0 for horizontal orientation and x advances are always equal to 0 for vertical orientation. Also, rename `advances_x` to `advances` for consistency and declare QGlyphLayout's data size in a single place. Change-Id: I56b20f893f8a6feb7aa870e3edbca99dd93ba2e2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-15/+15
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-271-0/+8
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Updated the addtional information about elide marksVenu2013-05-101-7/+12
| | | | | | | | | Added the same information for QFontMetricsF::elidedText. Task-number: QTBUG-30865 Change-Id: I57791de21f5721d7a505c3d13f450e5ec6cd2730 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Replace HB types used in API with Qt analogsKonstantin Ritt2013-03-121-1/+1
| | | | | | | | | | hb_uint32 <-> quint32 HB_Glyph <-> glyph_t HB_Fixed <-> QFixed, HB_FixedPoint <-> QFixedPoint HB_GlyphAttributes <-> QGlyphAttributes Change-Id: I4338ec4ce9a9c20ea591606ab10e6ef4f19931b8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-211-50/+46
|/ | | | | | | | | | | | | | ...and remove the outdated QUnicodeTables::Script enum. QFontEngineData now has one extra slot that never used (engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown], if accessed, would be set with a Box engine instance, and could be used as a minor optimization some time later. In order to preserve the existing behavior, we map all scripts up to Latin to Common. Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* doc: Fix several text-related qdoc warningsEskil Abrahamsen Blomfeldt2012-08-251-2/+2
| | | | | | | | | Also adds a new snippet which is just copy-pasted from the old documentation, because the snippet-file previously referenced seems to have disappeared. Change-Id: I0180715544321e076acda769cbdcbf19d50a971b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-011-2/+2
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Optimize QFontMetrics:: boundingRect() and left/rightBearing()Konstantin Ritt2012-07-101-6/+6
| | | | | | | | by avoiding unneeded metrics calculation. Same optimization for QFontMetricsF. Change-Id: I7fd0caa2ddb45862ee9e9c0519a71b03bcd0cb6f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>