summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Gracefully reject requests for absurd font sizesEirik Aavitsland2021-01-211-0/+6
| | | | | | | | | Avoid overflows. Fixes: QTBUG-89899 Pick-to: 6.0 5.15 5.12 Change-Id: Ic1a83c1704fe20be3d032358dc91ee8e751f2281 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove debug outputEskil Abrahamsen Blomfeldt2021-01-202-3/+0
| | | | | | | Accidentally committed in d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8. Change-Id: I553503720eace59a7bd510a7b9b2aba44c2242a1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* macOS: Fix assert with Freetype engineEskil Abrahamsen Blomfeldt2021-01-181-1/+1
| | | | | | | | | | | | d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 removed the internal usage of the singular fontDef.family, changing this to fontDef.families.first() instead, which will assert if the families list is empty. To match old behavior, we set the symbol flag to false if there is no family name. Change-Id: I594cf3dfa2798e60b37dc525c172fb2cd9aa7380 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Disable copying of QUrlResourceProvider to avoid slicingAlexander Volkov2021-01-141-0/+2
| | | | | | | Amends 376e3bd8ecf40881685714f6f19e12d68e92127e Change-Id: Ib7b0de900c009f3bdb3f699a218444aafbe2eabe Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows font engine: Silence warnings about not being able to enumate font ↵Friedemann Kleint2021-01-131-2/+2
| | | | | | | | | | | families Turn the warning into a qCDebug() statement and add explanatory comment. Fixes: QTBUG-85683 Pick-to: 5.15 6.0 Change-Id: I2a6a7a089a660294f3e9c3096299c75635b3b215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Add details to QFont::toStringPaul Wicking2021-01-121-1/+20
| | | | | | | | | Add details that explain the return value. Pick-to: 6.0 5.15 Fixes: QTBUG-81467 Change-Id: Ifad407a27259711fc9abe1bacc7ba9db105bdcc0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Introduce QUrlResourceProvider to load resources for HTMLAlexander Volkov2021-01-126-2/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | QTextDocument and the text editor classes suggest to override their loadResource() methods to provide data associated with a text document. This approach has the following drawbacks: - it requires subclassing - there is no way to set a global resource provider - QLabel is missing virtual loadResource() method and it can't be added without breaking ABI QUrlResourceProvider is designed to solve these issues. One should create a derived class that implements QUrlResourceProvider::resource(). The objects of the derived class then can be set for any text document. The default resource provider can be set with QUrlResourceProvider::setDefaultProvider(). This change also adds QLabel::setResourceProvider(), which doesn't break ABI. [ChangeLog][QtGui][Text] Introduced QUrlResourceProvider that allows to load resources for HTML. It is intended to replace the use of QTextDocument::loadResource(). Change-Id: Iaf19b229f522a73508f20715257450fe58f68daf Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* QPdfWriter: fix embedding fonts in pdf filesChristian Ehrlicher2021-01-091-1/+1
| | | | | | | | | | | | The container size change from int32_t to int64_t created a subtle error during font serialization. The size of a QByteArray was serialized without a proper cast and therefore now 8 bytes instead 4 bytes were written to the stream. Fixes: QTBUG-89727 Pick-to: 6.0 Change-Id: If9255a5a3124038356bc5053810f98c7c88f8a01 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Revert "Fix invalid text layout data when a full layout run is interrupted"Frederik Gladhorn2021-01-071-5/+2
| | | | | | | | | | | | | | | | This reverts commit 09ee4282e5eedf5b44245e8b28b223339f87ddfa. The commit made the layouting time go from linear to quadratic, which is problematic when rendering big documents impractical. I wrote an alternative fix for QTBUG-20354 which will come as separate change since it approaches the problem in a different way. Fixes: QTBUG-89599 Task-number: QTBUG-20354 Pick-to: 5.15 Pick-to: 6.0 Change-Id: Ie450332f06ee40e60c8e4c6c7d10834bff1acf74 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-075-215/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QInputControl: accept surrogate category characterLiang Qi2021-01-051-0/+3
| | | | | | | | | See also https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs . Fixes: QTBUG-89184 Pick-to: 6.0 5.15 Change-Id: I04eff7f42f0030346603a7b31e4ac854a477030c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid overflowing QFixed in text layoutEirik Aavitsland2020-12-101-0/+3
| | | | | | | Pick-to: 6.0 5.15 5.12 Fixes: QTBUG-89172 Change-Id: Icb78c8eeb1dbe4c5d4c6476beebafc0115a91e8c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use (new) erase()/erase_if() algorithmsMarc Mutz2020-12-052-10/+2
| | | | | Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-3012-35/+35
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Return an empty QStringList if the family string is emptyAndy Shaw2020-11-271-0/+2
| | | | | | | | Since doing a split will create an empty entry, then we can save time and just return an empty QStringList in this case Change-Id: I86a6532e7243151493ea4021bfcc05e4c2a9cbf0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix compiler warnings from deprecated methodVolker Hilsheimer2020-11-271-1/+1
| | | | | | | | | QTextCharFormat::fontFamily is deprecated in favor of fontFamilies, which returns a QStringList wrapped in a QVariant, whereas the setter expects a QStringList. Change-Id: I3333eaae4fc5ec3e3bdbec58047d6b3554b4a171 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QTextDocument: allow css border-style of table collapsed cell bordersChristian Ehrlicher2020-11-261-1/+1
| | | | | | | | | | | | 8664ee610d3d8bb8a2a578a6aa6bfd38afe4fcda added support for collapsed borders but set the style to solid no matter what border-style defined. Fix it by properly setting the desired border style. Task-number: QTBUG-36152 Change-Id: Ie527511f831e7f62ab7064d4958b35ddbf1a9403 Pick-to: 5.12 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Return a QString() if the families list is emptyAndy Shaw2020-11-241-2/+2
| | | | | | Fixes: QTBUG-88781 Change-Id: Iafed2be29e2e0c3029e832986ba58d19446214eb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix weight when reading old serialized QFontsEskil Abrahamsen Blomfeldt2020-11-201-1/+4
| | | | | | | | | | | | | | | | | | The QFont::fromString() needs to differ between strings produced before and after Qt 6.0 when interpreting the weight value, since in older strings this will be the legacy scale. Luckily the number of tokens in the string can be used for this purpose, since many tokens were added in Qt 6.0. This broke KDE, where font settings are stored in QSettings and serialized using QFont::toString() from Qt 5. Fixes: QTBUG-88589 Pick-to: 6.0.0 6.0 Change-Id: I199737fed61917f8b9d8f86176ead29a89eb8e0c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QFont: Prefer setFamilies() over setFamily()Andy Shaw2020-11-2021-160/+183
| | | | | | | | | | | | | | | | By depending on setFamilies() then we can be sure that font names with spaces, commas, quotes and so on are correctly handled without being misinterpreted. For now it will split on the comma when a string containing one is passed to setFamily. But from Qt 6.2 this will be removed to preserve the family string as a convenience function. [ChangeLog][QtGui][QFont] Indicated that setFamilies/families is preferred over setFamily/family to ensure that font family names are preserved when spaces, commas and so on are used in the name. Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-168-36/+36
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* QChar: make construction from integral explicitGiuseppe D'Angelo2020-11-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QChar should not be convertible from any integral type except from char16_t, short and possibly char (since it's a direct superset). David provided the perfect example: if (str == 123) { ~~~ } compiles, with 123 implicitly converted to QChar (str == "123" was meant instead). But similarly one can construct other scenarios where QString(123) gets accidentally used (instead of QString::number(123)), like QString s; s += 123;. Add a macro to revert to the implicit constructors, for backwards compatibility. The breaks are mostly in tests that "abuse" of integers (arithmetic, etc.). Maybe it's time for user-defined literals for QChar/QString, but that is left for another commit. [ChangeLog][Potentially Source-Incompatible Changes][QChar] QChar constructors from integral types are now by default explicit. It is recommended to use explicit conversions, QLatin1Char, QChar::fromUcs4 instead of implicit conversions. The old behavior can be restored by defining the QT_IMPLICIT_QCHAR_CONSTRUCTION macro. Change-Id: I6175f6ab9bcf1956f6f97ab0c9d9d5aaf777296d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove Qt4Compatible paintingAllan Sandfeld Jensen2020-11-121-9/+0
| | | | | Change-Id: Ie54206ca9b509875568f2158e229fca9cb1860a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Add missing brief statements for \property documentationTopi Reinio2020-11-121-2/+2
| | | | | | | | ... where applicable. Fixes: QTBUG-88232 Change-Id: I835df434765caededd35d5114965b4a1663e7942 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Reduce memory reallocations in QTextTablePrivate::update()Robert Loehning2020-11-092-14/+6
| | | | | | | | | | This fixes oss-fuzz issue 21100. Task-number: QTBUG-85139 Pick-to: 5.15 Change-Id: I635c1fa9b16dd527e568ec1e98ea7cac73977020 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Limit value in setFontWeightFromValue()Robert Loehning2020-11-091-1/+2
| | | | | | | | | QFont::setWeight() just accepts values between 0 and 900 anyway. Fixes: oss-fuzz-24986 Pick-to: 5.12 5.15 Change-Id: Ic65139a7821be3a12c65444d010736f03c8b74f5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix static assert in Markdown parserAndreas Buhr2020-11-081-1/+1
| | | | | | | | | A static assert was misstated. The equality operator has precedence over the bitwise or operator, the static assert was thus not checking what it was intended to check. Fixed by this patch. Change-Id: If21faa617dca1d1786fc6bfaf0b87423e0d35e4e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rename QRangeCollection to QPageRanges, make it a proper value typeVolker Hilsheimer2020-11-081-6/+4
| | | | | | | | | | | | | | | | | | | | | | | The type is specific about printing, so give it a name in line with QPageLayout and QPageSize. As per API review comment, it's not clear why this type should not be a regular, copyable and movable value type. It stores a list of intervals. Give it value-type semantics, as an implicitly shared class. Convert the parse method into a static factory function. Add a Range type and use it instead of the semantic-free QPair. Move QPrinter getter into QPagedPainteDevice, make it return a copy rather than a pointer, and add a setter. Extend test case to cover all members and more merge cases. Fix bugs found that way. Fixes: QTBUG-88113 Change-Id: If17ea4d410d49f16b097e88b7979db5d72add820 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Support the markdown underline extensionShawn Rutledge2020-11-073-2/+7
| | | | | | | | | | | | | | | | MarkdownDialectGitHub now includes this feature, so *emph* is italicized and _emph_ is underlined. This is a better fit for QTextDocument capabilities; until now, _underlined_ markdown could be read, but would be rendered with italics, because in CommonMark, *emphasis* and _emphasis_ are the same. But QTextMarkdownWriter already writes underlining and italics distinctly in this way. [ChangeLog][QtGui][Text] By default (with MarkdownDialectGitHub), markdown _underline_ and *italic* text styles are now distinct. Fixes: QTBUG-84429 Change-Id: Ifc6defa4852abe831949baa4ce28bae5f1a82265 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a few qdoc warningsVolker Hilsheimer2020-11-062-3/+3
| | | | | Change-Id: I7cc284ec56f02049d43a23c81659db94bfc3ff42 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Unexport QTextFrame/Block::iterator classesVolker Hilsheimer2020-11-062-32/+20
| | | | | | | | | Inline private constructors, use class initialization consistently. Export only non-inline'd members. Change-Id: I18f38214bbd03af711fe7ee1314d59e06733a0ec Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix a bunch of qdoc warningsVolker Hilsheimer2020-11-061-1/+1
| | | | | | | Remove or fix references to removed APIs, and some qdoc syntax fixes. Change-Id: I67d71062cd7a29f4eb74b02199b1482af5e59fc0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Set the url to have the AtNx filename if one is foundMorten Johan Sørvig2020-11-061-35/+13
| | | | | | | | | | | | | | There’s no need to convert the file name/path to QUrl, and then back again to QString before calling qt_findAtNxFile(). Call qt_findAtNxFile first, and then convert to QUrl. This makes sure the url-name and string-name stays in sync. Change-Id: I8b8939eabbdaff473945ebe31faafd408e9c4295 Pick-to: 5.15 Fixes: QTBUG-60793 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Deprecate QFontDatabase constructorVolker Hilsheimer2020-11-036-51/+44
| | | | | | | | Move private methods into the private class. Fixes: QTBUG-88114 Change-Id: I92fa52980ed5a0675eee310359d8875f614921e6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-031-5/+3
| | | | | | | | All QFontDatabase APIs are static, use them accordingly. Task-number: QTBUG-88114 Change-Id: I0e4a7508646037e6e2812611262eed8b6d7ad3de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add deprecated accessors for legacy font weightEskil Abrahamsen Blomfeldt2020-11-033-0/+71
| | | | | | | | | | | | | | In 3558704ed5c3d2c6dc6d024dfa454997469ca75f we changed the font weights to use the OpenType weights rather than our own non-standard scale. This can cause difficulty for people who have legacy font weights stored as ints and no way to convert them. Therefore, we add accessors for the legacy font weights to ease the transition. Change-Id: I2a591c62895dfa1a2310d9a2d0cdcf08de08f3a4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix QDataStream compatibility for QTextFormat::TextUnderlineColorLars Knoll2020-11-032-0/+9
| | | | | | | | | The enum value of that property changed. Use the same mapping trick as with two other properties to ensure backwards compatibility in QDataStream. Change-Id: I01b36f9ecbcaf40e7c8523da33ea4c8f12821a63 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* macOS + FreeType: fix crash with non printable unicodeAnton Kudryavtsev2020-11-021-1/+4
| | | | | | | | Task-number: QTBUG-84096 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ia60b7094ef9e82cf24f5a8b7995000ae65bb379a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix delay first time a font is usedEskil Abrahamsen Blomfeldt2020-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since 066daf750fcffff8eeae4d5749607501b9aa9a2f, we would mistakenly populate the fallback list for all ensureAt(index) calls, even when index == 0. This index indicates the main font, is always valid and does not require knowledge of any fallbacks. On Windows (and other platforms where QPlatformDatabase::fallbacksForFamily() is used) this would cause all fonts on the system to be loaded and should only be done when we actually need one of the fallbacks. With the GDI font database, in which font loading is slow because we have to manually read font data, this is especially bad. If we can later move to using DirectWrite for this, we should be able to improve on it, but in any case there is no need to pay the cost of the fallbacks when the application is just using the fonts it has selected (memory-wise this is also a bad idea). On my machine a simple text layout went from 370 ms to 37 ms. [ChangeLog][Text] Fixed an issue where on some platforms, there would be a delay the first time any font was used, sometimes causing a visible delay in the UI. Fixes: QTBUG-71737 Pick-to: 5.15 Change-Id: Ie8ce9b73f02a0e5cf39a2b280968b89f4caaf39e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QFontEngine: get rid of userData() trickeryKonstantin Ritt2020-10-282-12/+0
| | | | | | | | it is only used by QWin32PrintEngine and we know for sure QWindowsFontEngine::handle() returns HFONT Change-Id: I7656801e4642caf7df612d2f686061dca92707e0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix documentation warningsVolker Hilsheimer2020-10-241-4/+2
| | | | | | | | | Declare hidden friends like qdoc expects them, and other signature fixes Document function parameters Remove documentation for removed APIs. Change-Id: I44c1caeed0d40be04612129d074acc30b75f5259 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-232-9/+9
| | | | | | | | | It's been obsolete for a long time already. Make sure the compiler now warns about it and remove all remaining uses in qtbase. Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix output with box font engineEskil Abrahamsen Blomfeldt2020-10-201-5/+5
| | | | | | | | | | | | | | | | The box font engine was passing in alpha values in the blue channel instead of alpha channel to QImage::setPixel(), probably assuming that setPixel() accepts the input in the format of the QImage. But the whole point of setPixel() is that it converts the input. If we just want to set the alpha value, we can do it directly on the QImage::bits(). [ChangeLog][Text] Fixed showing boxes for glyphs when there are no fonts available in the font database. Pick-to: 5.15 Change-Id: I7ae067c26b9ecba6aaa046e7e4b9ae520c4b3d23 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QFontDatabase: fix a uint->int implicit conversionGiuseppe D'Angelo2020-10-191-2/+2
| | | | | | | Just use an int, as it'll be converted to that anyhow for insertion. Change-Id: Ie5a9d35a7c10e38cbba49d8915602f9207b8e0ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QPdf: consolidate usage of uintGiuseppe D'Angelo2020-10-192-8/+8
| | | | | | | | | Objects in QPdf are indexed by uint. In a couple of places (incl. QFontSubset) int were used instead, causing sign conversion warnings (turned into errors by -Werror). Use uint instead. Change-Id: Ie0436c8aff3b67d8ef95a5f26fc16403e7e02bd1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QTextTable: fix an implicit uint->int conversionGiuseppe D'Angelo2020-10-191-2/+2
| | | | | | | | Make it explicit; didn't investigate why mixed comparisons are used here. Change-Id: Idd353c76a65ca1c8c4a158886f64c9cbb321494b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use valid glyph index for box font engineEskil Abrahamsen Blomfeldt2020-10-191-2/+2
| | | | | | | | | | | | | | | | | | Glyph index 0 is reserved for "glyph not found", which can confuse Harfbuzz. For QFontEngineBox we always return a valid glyph since it is the fallback font when no other fonts are available. Symptom of issue was that we could get to Q_UNREACHABLE for certain strings when Harfbuzz returned a glyph count of 0. [ChangeLog][QtGui] Fixed a potential crash when rendering text with an empty font database. Fixes: QTBUG-85016 Pick-to: 5.15 Change-Id: Iaf1d003cdff57320bf4327aa8e63dffd9d1da82c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix some bad uses of QSharedPointerData::operator T*Allan Sandfeld Jensen2020-10-161-7/+7
| | | | | | | | Avoid detaching where possible Change-Id: I438d3e66689aeef05951af86a48af2a6910da7c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Port some more /*implicit*/-like comments to Q_IMPLICITGiuseppe D'Angelo2020-10-161-1/+1
| | | | | Change-Id: Ib70ad3f29365153af647deea54fc45467c413cb9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>