summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qglyphrun
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Skip mixedScript test on platforms with no Hangul fontEskil Abrahamsen Blomfeldt2023-11-022-7/+3
| | | | | | | | | | | | This test depends on the system actually supporting Korean text, otherwise it will just return a single glyph run with the digit and the missing glyph symbol. Pick-to: 6.5 6.6 Fixes: QTBUG-118649 Change-Id: I54e55414ae4ba0a6328c7c3a57ae8840d3b123b1 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tests/auto/: port Q_FOREACH to ranged-for, local const containersAhmad Samir2023-08-191-7/+4
| | | | | | | | | | | | | | | | | | | | These are local containers that are either: - Already const and didn't need Q_FOREACH to begin with - Can be simply made const, just by adding const keyword In one case the unittest checked that the container's size is 1, so use list.first() instead of a for-loop. In files where Q_FOREACH isn't used any more, remove "#undef QT_NO_FOREACH". Also remove those files from NO_PCH_SOURCES. Drive-by changes: - Remove parenthesis from one-line for-loops - Make the for-loop variable a const& where a copy isn't needed Task-number: QTBUG-115839 Change-Id: Ide34122b9cda798b80c4ca9d2d5af76024bc7a92 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Mark all of Qt as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses in this and some other modules is still extremely high, too high for anyone to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the #undef QT_NO_FOREACH to indicate that these actually test the macro. Task-number: QTBUG-115839 Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Make gui tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I2ef59684cf297a0222a136ce7b5630037294d000 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-171-2/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix two compiler warningsAhmad Samir2023-01-051-1/+1
| | | | | | | | | Comparing singed/usigned ints. Use override keyword. Change-Id: I03d2c4359e0600360ebcfece593a3b125e5c9c53 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Don't hide object replacement char except in rich textEskil Abrahamsen Blomfeldt2022-12-141-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The object replacement character (U+FFFC) is used to represent inline objects such as images in rich-text. To enable this, we have special handling of it in QTextEngine. For classes where inline images are not supported, it will just be hidden from the visual text, which is unexpected. Instead of always special-casing it, we make this dependent on whether the document layout has registered any object handlers. If they have not, then there will be no visual representation of the object, and it is better to show the glyph for it. For anything based on QTextDocument, there will always be the image handler, so U+FFFC will still have special handling there, but for non-rich labels and plain text editors the glyph will be shown instead. Note that there was also a bug in QLineEdit, where the object replacement character was always replaced by a space. This was introduced in 2007, in a patch which replaced a !ch.isPrint() with a check for "the most obvious non-printable characters" to reduce the number of characters that were not shown. However, U+FFFC is a printable character and would thus not have been filtered by the !isPrint() condition, so I think this was a mistake at the time. However, due to the special-casing of the character in Qt, it would not have had any effect until now. This also changes the QTextLayout::cursorToXForInlineObject() test to actually test proper inline objects, as this was previously using a hack which depended on the inline object code to be used even for plain QTextLayouts with no handlers for these. [ChangeLog][Text] The object replacement character (U+FFFC) is now only filtered out in rich text controls, where they represent inline objects. In other controls, its glyphs will be shown as with other text. Pick-to: 6.5 Fixes: QTBUG-101526 Change-Id: I7fcaf2b10918feb41589e1098016efbf79a0e62d Reviewed-by: Lars Knoll <lars@knoll.priv.no> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Try to match variant-selector font to preceding characterEskil Abrahamsen Blomfeldt2022-12-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variant-selectors are special unicode symbols which are used to modify glyph selection for the preceding character. For instance, a regular symbol could be turned into a color emoji using VS16, the emoji variation selector. In order for this to work, however, the font that handles the selector has to handle the full pair of characters, so that it can apply the correct substitution rules. One specific example of this was on macOS, where an airplane symbol + VS16 would match the symbol to the default UI font but the VS16 to the emoji font. Since there string provided for the emoji font did not have any preceding character for VS16, we just ignored it. To improve on this, we now detect variation selectors that have been matched to different font engines than the preceding character. When such a case occurs, we check if the selector font also supports the preceding character, and if it does, we keep the pair together and use the same font for both. [ChangeLog][QtGui][Text] Fix some cases where a variation-selector character would be ignored in font selection and the correct variant of a character would thus not be selected. Task-number: QTBUG-108799 Change-Id: I9f427e0520e652ee2f24a4f7dc3c1957251e06bd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix missing text when Harfbuzz fails to shape a substringEskil Abrahamsen Blomfeldt2022-12-051-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This amends fccd419dd632306a4bd85928223e0a56a59510ef. If Harfbuzz failed on one of the items in a string and returned zero glyphs, then we would exit the shaping loop. The mentioned change fixed a crash related to this when the ignored character was the only character in the string, but it occurred in a subitem of a longer string, then we would return and fail to lay out the rest of the string. This popped up recently because an update to Harfbuzz has caused it to return zero glyphs when applying the Apple emoji font to an isolated variant character (see bug report). When we matched the symbol to the main font and only the variant character to the emoji font, we would get in this situation, and end up exiting the shaping early. [ChangeLog][QtGui][Text] Fixed a regression which would sometimes cause text to disappear if the string contained an unmatched variation selector character. Pick-to: 6.4 Fixes: QTBUG-108799 Change-Id: I616ab1b2d33c2df731419c5ce06fbc578a625a32 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Don't return a visual glyph for ignorable charactersEskil Abrahamsen Blomfeldt2022-12-051-3/+1
| | | | | | | | | | | | | | | | When Harfbuzz returns zero glyphs, this will typically be because the character is ignored. We currently have no way to differentiate this from actual error cases, so to avoid return the error glyph for cases which are not really errors, we set the dontPrint flag for this. When we add a way to differentiate between error cases and non-error cases later, we should revert this for the actual errors. Pick-to: 6.4 Task-number: QTBUG-108799 Change-Id: I2a910d951b71c705fb4dd761fcfe3a942b3afa7c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix type mismatch compiler warning in tst_QGlyphRunAxel Spoerl2022-11-101-33/+33
| | | | | | | | | | | When comparing a glyphIndex with a hard coded number, the number is cast to an int, whereas the glyphIndex is an unsigned int. That causes a compiler warning. This patch forces the numbers to be cast to an unsigned int. Change-Id: I8a31124c6afacfc4ecfb13caf2cb8133dad44a21 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Introduce QGlyphRun::stringIndexes()Eskil Abrahamsen Blomfeldt2022-09-293-0/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a way to trace each entry in the glyph index array to a specific index in the original text passed to QTextLayout, as well as a convenience function to access the original string from the QGlyphRun. The index information is stored in the logClusters array internally in Qt, but it contains the inverse information: For each character in the output string, it contains an index into the glyph array. In order to get the string indexes for each glyph, which makes a lot more sense in the context of the QGlyphRun API, we need to do a little search to construct the data. To avoid adding unnecessary allocations, we make the new APIs opt-in. If you do not specify anything, you will only get the glyph indexes and glyph positions as before. However, you can now specify exactly which parts of the layout to extract using an optional flags parameter. This also adds a manual test which can be very handy to visualize QTextLayouts and how they are split into QGlyphRuns. Fixes: QTBUG-103932 Change-Id: Ie4288fff338b9482aba0aba29fc7e1e59fa60900 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-1/+1
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* BLACKLIST: tst_QGlyphRun::mixedScripts for Ubuntu 22.04Heikki Halmet2022-06-201-0/+1
| | | | | | | Pick-to: 6.4 6.3 6.2 5.15 Task-number: QTBUG-68860 Change-Id: I79c085c7321e0bee78e8cb31daa8c7992d3a3ec6 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+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>
* CI: Blacklist mixedScripts for QNXPasi Petäjäjärvi2022-04-051-0/+3
| | | | | | | | | QNX tests are run under QEMU so have the same problem as Ubuntu. Pick-to: 6.2 6.3 Task-number: QTBUG-100928 Change-Id: Id7c7639b743062c777502e2ba8b28f9bb18deb19 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* CMake: Add BUILTIN_TESTDATA option to qt_internal_add_testAlexey Edelev2022-02-111-12/+7
| | | | | | | | | | | Multiple tests use qt_internal_add_resource that copies the functionality that is already implemented inside the qt_internal_add_test function. Simplify these test by replacing the qt_internal_add_resource call with the new BUILTIN_TESTDATA option. Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-171-5/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix compiler warning: don't mix signed and unsigned int in comparisonVolker Hilsheimer2021-02-111-1/+1
| | | | | Change-Id: Ib6609d70900a0c26dd88bbfd16e886773ae67420 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix flakiness in tst_QGlyphRun::drawRightToLeftEskil Abrahamsen Blomfeldt2021-02-042-6/+0
| | | | | | | | | | | | | | | | As described in 3279c8e7d72c5eee379fa8e4a2789acfe40445c0, we can't depend on the widths of decoration to always be the same for drawText() and equivalent drawStaticText/drawGlyphRun. This is typically visible as an off-by-one when using the default fonts on OpenSUSE. Since this test was actually made to test positions of RTL glyphs, we can just disable the decoration and simplify the text. Fixes: QTBUG-89086 Change-Id: I139fe3e1c5e98d8b1d7e0e7c19645fd4717d1d95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove false Q_UNREACHABLE from shaping codeEskil Abrahamsen Blomfeldt2021-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added by 9ff76c27b9031ae7c49c4c9e8b5a3bea1e0e3c78 on the basis that it signifies a shaping error and would later assert or crash. But the line is easily reachable by user code. If Harfbuzz returns 0 glyphs, it just means it is unable to shape the string, for instance if the input string only contains default ignorables (like a ZWJ) and does not have any appropriate glyph to use for replacement. Qt expects there to always be at least one glyph in the output (num_glyphs == 0 is used to indicate shaping is not yet done), so to avoid asserts later on, we simply populate the output with a single 0 token, which is a required entry in the font that is reserved for representing unrepresentable characters. This also adds a test and therefore a zero-width joiner to the test font to reproduce the issue. [ChangeLog][QtGui][Text] Fixed a possible crash with certain fonts when shaping strings consisting only of control characters. Fixes: QTBUG-89155 Pick-to: 5.15 Pick-to: 6.0 Change-Id: Ia0dd6a04844c9be90dcab6c464bebe339a3dab11 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove blacklisting for b2qt tests that now passSamuli Piippo2021-01-281-1/+0
| | | | | | | With the updated QEMU and toolchain, these tests now pass. Change-Id: Icb74562a0e6422cd4564f63db991aa431e0e3119 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-10/+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>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+1
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tests: blacklist tst_QGlyphRun::drawRightToLeft() on openSUSELiang Qi2020-12-081-0/+2
| | | | | | Task-number: QTBUG-89169 Change-Id: I4dfd608e264c9503093cc9fe27e80c489efe7aaf Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-2/+2
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Extend test blacklisting from Ubuntu 18.04 to 20.04Tor Arne Vestbø2020-09-031-0/+1
| | | | | | Task-number: QTBUG-86187 Change-Id: I3ac3233f7355d1c16bc9bf6e052fdf4bd9ea90de Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTestlib: Enable comparing QList against initializer lists/arraysFriedemann Kleint2020-07-211-2/+7
| | | | | | | | | | | | | | | | | | | | | It is unnecessary to create a QList container just for comparison. Split out helpers for comparing sequence sizes and sequences from qCompare(QList) and add a template for an array with a non-type template parameter for the size. One can then write something like: const int expected[] = {10, 12,...}; QCOMPARE(QFontDatabase.pointSizes(...), expected) Unfortunately, any commas in such an array will be misread by macro expansion as macro argument separators, so any expected array with more than one entry needs an extra macro expanding __VA_ARGS__. Change-Id: Ie7c8dc20bf669bbb25f6d7f8562455f8d03968c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-091-2/+2
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use QList instead of QVector in gui testsJarek Kobus2020-06-251-23/+23
| | | | | | Task-number: QTBUG-84469 Change-Id: Ia86f39597de418dde6cd9ae3170ef919bd27416a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move some flaky text tests into LancelotEskil Abrahamsen Blomfeldt2020-06-081-132/+0
| | | | | | | | | | | | | | | | | | | | | There are some slight differences between normal drawText() and QGlyphRuns/QStaticText for decoration widths in certain fonts. We decided to accept this and tried working around it in the test by using ForceIntegerMetrics (since the difference is < 0.5 pixel). This enum has been deprecated, so we move the tests into Lancelot instead, since the idea here is to test for regressions, not to compare the two painter commands. Note that there is something off about decorations with drawGlyphRuns() and drawStaticText() which is exposed (not caused) by this, perhaps related to using a matrix for positioning, since that was untested before. This also takes the liberty of moving the emoji test string from text.qps, since this was not in the statictext.qps yet. Change-Id: Ib2d697095cbd11829cdd50b3c0268c85e9607c78 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove winrtOliver Wolff2020-06-061-3/+0
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* cmake: add tests/auto/gui/textFrederik Gladhorn2019-11-011-0/+28
| | | | | | | Fixes: QTBUG-78228 Change-Id: I3d4666a553e94de47e01d64551b8fe672994b137 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* unblacklist passing testsDaniel Smith2019-07-081-1/+0
| | | | | | | | These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-041-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QRawFont::unsupportedWritingSystem() and tst_QGlyphRun::mixedScripts() on windows for now. Conflicts: qmake/generators/makefile.cpp src/corelib/itemmodels/qstringlistmodel.cpp src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp tests/auto/gui/text/qglyphrun/BLACKLIST tests/auto/gui/text/qrawfont/BLACKLIST Task-number: QTBUG-72836 Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
* | Remove QEXPECT_FAIL from test on macOSEskil Abrahamsen Blomfeldt2018-10-101-4/+0
|/ | | | | | | | | | The flakiness was reported for macOS 10.8 a long time ago and I am not able to reproduce it, so lets remove the workaround for it. Task-number: QTBUG-32690 Change-Id: I92e64065c7480b8f4c5d1d1e6cb5fdd218a70313 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* winrt: Fix/blacklist failing text related auto testsOliver Wolff2018-06-221-0/+3
| | | | | | | | | winrt still has some issues with some character sets. These tests are skipped/blacklisted for now and will be investigated. Task-number: QTBUG-68297 Change-Id: I898e3383a4673b6dc87815a75e705f3302a4cbba Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Blacklist tst_QGlyphRun::mixedScriptsJoni Jantti2018-06-151-0/+3
| | | | | | | | This autotest fails on Ubuntu 18.04 and QEMU builds. Task-number: QTBUG-68860 Change-Id: I1907e713e8c743cf5cf8e284df516600a0c03dba Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* Accept error margin in QGlyphRun/QStaticText test for decorationsEskil Abrahamsen Blomfeldt2017-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the width of a text for drawing decorations on top, we use the effective advance of the whole text after it has been through the shaper. However, in the case of QStaticText and QGlyphRun, there is shortcut: Since we only have the glyph indexes and position of each glyph, we use the position + advance of the right-most glyph to find the right-most edge of the decoration. For this, however, we use the advance of the glyph *out of context* of the rest of the string, because the whole idea is to avoid doing the shaping of the string with every draw call. In some rare cases, the advance of the right-most character, in the context of the string, is different from the advance of the standalone glyph. Now, one way of fixing this would be to store the width of the text in QStaticText and QGlyphRun, but since it is a very rare artifact which is barely visible, I have opted to just work around it in the test instead, the workaround being to force integer metrics so that we don't get the small 0.2 pixel error. Task-number: QTBUG-55217 Change-Id: I8d16d52f2ef27275cabb7d3865aeeaa31617ba3d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtGui: Remove Windows CE.Friedemann Kleint2016-03-301-9/+2
| | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, and tests. Task-number: QTBUG-51673 Change-Id: I55f61845c3b54027c467a5c59c122e7d16955358 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-181-0/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix bounding rect of glyph runs in multi-line QTextLayoutEskil Abrahamsen Blomfeldt2016-01-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When getting the glyph runs from a QTextLayout with multiple lines, the glyph runs would be merged if possible, but not their bounding rects. This was an oversight. [ChangeLog][Text][QTextLayout] QTextLayout::glyphRuns() now returns united bounding rects for glyph runs that are merged. Change-Id: Ibbeaa99ecfc4e82e7965342efdae7c3c2b637343 Task-number: QTBUG-50715 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove insignificant flag from qglyphrun testTony Sarajärvi2016-01-221-2/+0
| | | | | | | | | | | | Task-number: QTBUG-28593 Change-Id: I04e73947c7f131bdb4341c224fb008b26be22c22 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+0
|/ | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@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>
* QStyleSheetStyle: Don't interfere with QFontDialogPierre Rossi2014-10-243-6/+5
| | | | | | | | | | | | | The sample lineedit in Qt's own font dialog shouldn't have its font affected by stylesheets. Not only does this hampers the ability to preview the font, it actually overrides the font selection as that one is taken directly from the widget. Task-number: QTBUG-41513 Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>