summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated methods and address some ### Qt 6 comments in gui/textVolker Hilsheimer2020-06-095-86/+2
| | | | | Change-Id: If1ed58ecbb13df88bdb1d72caccfd01c14d42eac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Remove deprecated text-related enumsEskil Abrahamsen Blomfeldt2020-06-087-90/+15
| | | | | | | | Fixes: QTBUG-82367 Change-Id: Iff2645759657f8e350754e90e791dbd583017671 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make the QFontCache size configurableMartin Jansa2020-06-081-2/+4
| | | | | | | | | | It can be configured using the QFONTCACHE_MIN_COST define when configuring Qt. Change-Id: I41fb781099c4c0f03c378f10c8db4ea06ef4e9ff Task-number: QTBUG-83127 Reviewed-by: Risto Avila <risto.avila@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Set the dontPrint attribute correctly for the character being checkedAndy Shaw2020-06-041-1/+1
| | | | | | | | | This amends 36325f9d86249a4f17f7efbbc1122c462708d909 so that the dontPrint attribute is set before incrementing i Change-Id: I0be7386253d8607596489ce1025d2f3f8d468ab4 Pick-to: 5.15 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Support winding fonts like Windows doesAllan Sandfeld Jensen2020-06-031-0/+4
| | | | | | | | | | Map Latin-1 characters to the Winding unicode entries for symbol fonts to render those fonts like Windows does. Pick-to: 5.15 Fixes: QTBUG-84409 Change-Id: I60b81d93412d970d25a98606545773db6c8ab723 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix a bogus assertLars Knoll2020-05-311-1/+1
| | | | | | | | | advances and glyphIndices can be nullptr's as long as numGlyphs is zero. Change-Id: I29c3764792c1a0ffaafd3393c82a26af65699ab3 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move CoreText font engine/database to QtGuiTor Arne Vestbø2020-05-276-0/+2156
| | | | | | Task-number: QTBUG-83255 Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move FreeType font engine/database to QtGuiTor Arne Vestbø2020-05-276-0/+2805
| | | | | | Task-number: QTBUG-83255 Change-Id: If6be7057d6bd25b34acd99e18658744161985ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QTextMarkdownImporter: allow nesting text span formattingShawn Rutledge2020-05-271-0/+2
| | | | | | | | | | | | | | | The bold+italic combination indicated by ***triple stars*** requires this; but it enables combinations of italics, bold, strikeout, anchor text (and associated link formatting), image alternate text, and inline code formatting (monospace). A code span overrides the formatting from surrounding spans (which might be a bug to fix in another patch, if we compare to how md2html formats code nested in bold-italics for example), but the format stack restores state when any char format span ends. Task-number: QTBUG-81306 Pick-to: 5.15 Change-Id: I289556fa53de400eb50a4d159b9b344eafc517da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-05-181-2/+5
|\ | | | | | | | | | | | | Conflicts: src/corelib/text/qbytearray.cpp Change-Id: I63706409464d31391012bacdadfd1f6300509787
| * Fix invalid text layout data when a full layout run is interruptedStefan Löffler2020-05-141-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QTextDocument is laid out, this is done in "chunks" to keep programs responsive. During the layout process, blocks are split into lines. When a full (re)layout is interrupted (e.g. because a QHighlighter changes some formats before the layout for all chunks is completed), later chunks are skipped. This results in invalid data (e.g., blocks not split into lines). This change ensures that full layout runs of the root frame are completed even after interruptions. Fixes: QTBUG-20354 Change-Id: I041c73a532a5abe74d577ca49810191b5594dca2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Compile fixes for clang10Lars Knoll2020-05-051-4/+4
| | | | | | | | | | | | | | | | Fix some warnings that are flagged as errors on clang10. Change-Id: I906634c8b2bd94db42d74a7f3d10efb086e373cc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit bc726ed5d96161b70a22b9a11e0943acca219cfc)
* | Remove deprecated method from QFont, QFontMetrics, and QFontInfoVolker Hilsheimer2020-05-155-420/+0
| | | | | | | | | | Change-Id: Ifc8fb5c5d53359b33b8abab3bbee3de61bfef539 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | MSVC: Fix build with -developer-buildEskil Abrahamsen Blomfeldt2020-05-121-2/+2
| | | | | | | | | | | | | | | | Passing 0xA7 to a signed char causes a truncation warning with MSVC2017. Make the cast explicit. Change-Id: Ief1a97c52544b271556811816f7804074bd336df Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Replace some QString::fromRawData() with QStringViews around the codeMarc Mutz2020-05-121-1/+1
| | | | | | | | | | | | | | | | | | Even though QString::fromRawData() may not be as expensive as it used to be, it's still and out-of-line call _and_ more characters to type, so replace with QStringView construction where applicable. Change-Id: I70662da1bd45284f67e117e92b25d242afb8aaf8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Use QChar::fromUcs4() moreMarc Mutz2020-05-121-1/+4
| | | | | | | | | | | | Change-Id: I02be41de92d84145186de9ac5f5ea3541a941964 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Long live qHashMulti(Commutative)Giuseppe D'Angelo2020-05-122-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper function so that we have a shortcut. Instead of writing: QHashCombine hash; seed = hash(seed, fieldA); seed = hash(seed, fieldB); // etc. return seed; one can now simply write: return qHashMulti(seed, fieldA, fieldB, fieldC); Port a few usages inside qtbase as a demonstration. [ChangeLog][QtCore][QHash] Added the qHashMulti and qHashMultiCommutative functions as convenience helpers to calculate a hash from multiple variables (typically, data members of a class). Change-Id: I881a9ad41168df20ceecc6588a94abe7ddc6a532 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | QtGui: fix deprecated QChar conversionsMarc Mutz2020-05-1112-31/+26
| | | | | | | | | | | | | | | | | | Conversions from non-char-types to QChar are going to be deprecated. Use QChar::fromUcs2(), fromUcs4(), QLatin1Char(), or convert the constructor argument to char16_t. Change-Id: Ib45ebd5560aa3a2bc460037ab09773607485c6e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Fix out-of-bounds access when searching arraysVolker Hilsheimer2020-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Coverity. All arrays in this code have the size Num... - 1, so accessing the entry at Num... - 1 is out of bounds. Since we don't dereference the value, and only use the address of the entry "one past the last" like an end- iterator, this does not actually access out-of-bounds memory. However, this code does rely on undefined behavior. Use pointer arithmetics instead to get the address of the entry "one past the last", which is well defined behavior and should satisfy Coverity. Change-Id: Ie5fbb2da080d6118169f35056763b5d95cfeda62 Fixes: QTBUG-83817 Coverity-Id: 183557 Pick-to: 5.15 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* | QTextOdfWriter: store all bulletChar()s as char16_t'sMarc Mutz2020-05-081-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and return them as QStringView from a file-static function so that the conversion to QString is centralized in just one place (and we can think of skipping the QString conversion once QXmlStreamWriter can write QStringViews and not just QStrings). Because the Style enum is ... weird (negative values), plaster the code with static_asserts so that we get to detect breakage when the enum values change. Change-Id: I4ca89b6c2601c6a1153e202de966356bb4f51651 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QFontDatabase: store all writingSystemSample()s as char16_t string literalsMarc Mutz2020-05-081-211/+77
| | | | | | | | | | | | | | | | | | | | | | ... and return them as QStringView from a file-static function so that the conversion to QString is centralized in just one place (and we can think of returning a QStringView in the public API?). Change-Id: Ie33e2af1b57b8cb34672d245fb9205c68260f440 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFontDatabase: store Vietnamese writingSystemSample() in UTF-16Marc Mutz2020-05-081-9/+1
| | | | | | | | | | | | | | | | | | | | | | The old code stored it in UTF-8 with an encoded BOM. Using the new QString::op+=(QStringView), we can store the string, without the BOM, in ten instead of 15 bytes. Change-Id: Ia1c51da523fcd6298b39bf2ec162a49c7cfdda63 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhereJan Arve Sæther2020-05-051-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In that specific wrapping mode, it will first try a normal word wrap. If it doesn't fit within the specified line width it will discard the result of that and try WrapAnywhere by calling layout_helper() recursively. The problem was that at the point it called itself again it had already adjusted eng->maxWidth: eng->maxWidth += line.textWidth; This was not restored, but carried on to the recursive call to layout_helper(), so the end result was that the maximumWidth would accumulate text widths from parts of the same line twice. Due to the same recursive behavior the minimumWidth also had a problem: It always returned the width of the widest word because it took the qMax() of the minimum widths of the two passes, (WordWrap and then WrapAnywhere) effectively making the minimum width always be the width of the widest word (even though it could wrap at finer granularity). Pick-to: 5.15 Task-number: QTBUG-77337 Change-Id: Ie7e9c17b157506352c2da38cc7f4a8dfa1283966 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Port two more local QSets to QDuplicateTrackersMarc Mutz2020-05-051-4/+3
| | | | | | | | | | | | | | | | | | Apart from a more fitting, minimal, API, QDuplicateTracker also transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or at least reduce, memory allocations. Change-Id: Ia9e837ebba88aeb1916da041fc8460a0692a03e4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-041-1/+10
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| * Merge remote-tracking branch 'origin/5.14' into 5.15.0Qt Forward Merge Bot2020-04-271-1/+10
| |\ | | | | | | | | | Change-Id: I889c639db2fe24d17d535a2c4f52d72ea32491f8
| | * Doc: Describe updating fonts with substitutes5.14Leena Miettinen2020-04-241-1/+10
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-82577 Change-Id: I40662240da69c0d93d0386172c10f375fbb5fefc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Fix font height metrics with embedded bitmapsEskil Abrahamsen Blomfeldt2020-05-042-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For fonts with embedded bitmaps, we cannot trust the HHEA and OS/2 tables, since there are a different set of font metrics in the EBLC/CBLC tables for each of the predefined bitmap sizes. In this case, we can safely fall back to the metrics returned by the system, as the inconsistency we were originally fixing was only between OS/2 and HHEA and will not matter for the bitmap fonts. This patch also simplifies the code path through the font engines a bit. Instead of setting the system metrics in the processHheaTable() function when the table cannot be found, we instead always fetch the system metrics at the very start of initializeHeightMetrics() and then override if there are no embedded bitmaps, and if the HHEA and OS/2 tables are available. This also reduces the number of virtual functions needed to sort out the height metrics. Fixes: QTBUG-83754 Change-Id: Ib9dc6fc6cf972e48209a4a272469d2b4bd1ebffe Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Fix warnings about size_t to uint truncationLars Knoll2020-05-022-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use size_t for the internal hashing in QTextFormat to be in line with QHash. Change-Id: I210ab1622225f8e435d22e27ee7f730a4522ebe7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Remove a couple of QTextStream usagesLars Knoll2020-05-011-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use QTextStream to write a QString to a file in UTF-8. This can be done more easily, by directly converting the QString to utf-8 and calling write on the io device. Change-Id: I4b617b342ab339affb396ed49c5a920985d1ddfd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | QtGui: fix a few more char/int/uint -> QChar conversionsMarc Mutz2020-04-302-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I343269b61d555c259b5780011e99f85f5375ef78 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QUnicodeTables: port to charNN_tMarc Mutz2020-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes existing calls passing uint or ushort ambiguous, so fix all the callers. There do not appear to be callers outside QtBase. In fact, the ...BreakClass() functions appear to be utterly unused. Change-Id: I1c2251920beba48d4909650bc1d501375c6a3ecf Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Remove deprecated members from several QtGui classesVolker Hilsheimer2020-04-272-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those can be trivially removed as they have direct replacements, or are completely unused. The migration path for QCursor::bitmap and QCursor::mask is QBitmap *pb = c.bitmap(); // up to 5.15, warns in 5.15 QBitmap vb = c.bitmap(Qt::ReturnByValue); // from 5.15, works in 6 QBitmap b = c.bitmap(); // from 6.0 on Change-Id: I3b3acd1c7f09c4c8414e98b3ce11986f1ecd5eda Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Move Qt::codecForHtml() to qtextcodec.*Lars Knoll2020-04-242-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | The method should move out of Qt together with QTextCodec in Qt 6. Qt 6 will in any case always assume utf8 for 8bit encoded HTML. Change-Id: I68adbc1f0df7e36a82ef6b434ee3771f23e3b790 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-221-8/+11
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-221-8/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| | * | Markdown writer: omit space after opening code block fenceShawn Rutledge2020-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CommonMark spec shows that it's not necessary to have a space between the code fence and the language string: https://spec.commonmark.org/0.29/#example-112 This also avoids a needless trailing space after a code fence that does not include a language string. Change-Id: I2addd38a196045a7442150760b73269bfe4ffb22 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Markdown writer: don't wrap code block, and detect its endShawn Rutledge2020-04-201-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The end of a code block nested in a list item is now detected; and if the text of the list item continues after the code block, it continues to be indented. Code blocks should never be word-wrapped. Fixes: QTBUG-80603 Change-Id: I4427f8b1d4807d819616f5cb971e2d006170d9be Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Use consistent vertical metrics on all platformsEskil Abrahamsen Blomfeldt2020-04-222-4/+98
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt assumes that ascent+descent is the bounding height of the text, but for historical reasons, the ascent for some fonts will not contain the diacritics. On Windows, the preference is to use data from the OS/2 table which were explicitly invented to work around this, but on other platforms we are not respecting this table. This causes a text layout that looks fine on Windows to have overlapping characters on e.g. macOS. To make vertical metrics (ascent, descent, leading) consistent across all platforms, we don't blindly trust the values we get from the underlying font system, but apply in the following order: 1. If OS/2 table exists and USE_TYPO_METRICS flag is set, we use the typo metrics from OS/2 table 2. If OS/2 table exists and USE_TYPO_METRICS flag is not set, we use winAscent/winDescent from OS/2 and the line gap from HHEA table. 3. If no OS/2 table exists, we try to get ascent, descent and line gap from the HHEA table. 4. If the HHEA table does not exist (not an SFNT), we fall back to the system-provided metrics. (on macOS, we know the system-provided metrics will match the data in HHEA, so we skip parsing that table and use the data from CoreText if there is no OS/2 table). Task-number: QTBUG-80554 Change-Id: I41e6561a99513698c8e42451b4ec98bd5eb6892f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | Remove unused forward declarationLars Knoll2020-04-211-4/+0
| | | | | | | | | | | | | | | Change-Id: Ice9c83f5ef2f0178e999836dcb21140bb8ab8b64 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Always encode HTML as utf-8Lars Knoll2020-04-216-35/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | When converting a text document to HTML, always convert it to utf-8, as required by the HTML standard. This also means that we remove the optional encoding parameter. Change-Id: I0bd2fc9df2d06734e1c5b8053b964fbfbb6881e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Always save QTextDocuments encoded in utf-8Lars Knoll2020-04-214-53/+3
| | | | | | | | | | | | | | | | | | | | | | | | Get rid of the options to set another encoding. In 2020, we should always write documents as utf-8. Change-Id: If39dd3a876f85a70735169113bce9c25f2d981b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Compile fixes for clang10Lars Knoll2020-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | Fix some warnings that are flagged as errors on clang10. Change-Id: I906634c8b2bd94db42d74a7f3d10efb086e373cc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Fix a few size_t / int conversion warningsFriedemann Kleint2020-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change the hash function of QTypeRevision and QtFontFallbacksCacheKey to use size_t and add a few casts. Change-Id: I89a8fc617abbe8b0c67529ec41795691c99b0574 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Change qHash() to work with size_t instead of uintLars Knoll2020-04-096-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Support multiple page ranges in QPrinterSzabolcs David2020-04-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QRangeCollection type to store and manage multiple page ranges. This moves out the parser and validator logic from the platform dependent (UNIX) dialog and makes it publicly available from QPrinter. This improves the usability of QPrinter in those applications which doesn't use print dialog to configure printer. (e.g.: QTextDocument, QWebEnginePage) Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-081-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * | qpa: Remove references to lighthouseTor Arne Vestbø2020-04-031-1/+1
| | | | | | | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Remove QRegExp based API and QRegExp usage from QTextDocumentLars Knoll2020-04-012-134/+8
| | | | | | | | | | | | | | | Change-Id: Ib5cc2d747f215a483585b703f9b4f6415e0d59f7 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>