summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-11-101-0/+15
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborcommon.h src/corelib/tools/qlocale_data_p.h tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-091-0/+15
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| | * QSyntaxHighlighter: Delay all highlights until first rehighlightMårten Nordheim2018-11-081-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling setDocument (directly or through the constructor) a delayed rehighlight is initiated. Previously, if any text was changed before this rehighlight could run it would cancel the rehighlight, even if the changed text only caused a new block of text to be highlighted. Fixes: QTBUG-71307 Change-Id: Ib09b664d90906f5b4427105f0e45469806f3a779 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | Handle fonts that have commas/quotes in the family nameAndy Shaw2018-11-086-14/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the comma character was originally used as a separator, we need to extend QFont to have setFamilies() so that we can avoid joining the family strings together. This enables us to see the family name as a single string and for multiple family names, we have families(). Subsequently, this has added functions to QTextCharFormat to account for multiple font families too. So it is now possible to set a single one directly with setFontFamily() and multiple ones with setFontFamilies(). This also bumps up the datastream version to 19 as QFont now streams the families list as well. [ChangeLog][QtGui][QFont] Add setFamilies()/families() to aid using of font families with commas and quotes in their name. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 19 to account for changes in the serialization of QFont. Fixes: QTBUG-46322 Change-Id: Iee9f715e47544a7a705c7f36401aba216a7d42b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-251-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
| * | QCss: properly parse functions which contains additional spacesChristian Ehrlicher2018-10-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there were additional spaces between the function definition and the first parameter, the parser failed to parse it when it contained another function (e.g. 'qlineargradient(... rgb() ...)'). The reason for this was that ::until() needs the function at index-1 so it can correctly count the opening parenthesis. Fixes: QTBUG-61795 Change-Id: I992f556e7f8cd45550f83bc90aa8de2b4e905574 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Qt Style Sheets: fix range of hue in hsl/hsv functionsChristian Ehrlicher2018-10-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hue parameter in hsl/hsv was treated the same way as a the other parameters although it's range is from 0-359 and not from 0-255. Fix it by extending the maximum range for the first parameter when parsing a color value given in hsv or hsl. [ChangeLog][QtGui][CSS] Fix the range of the hue parameter when parsing a color given in hsl or hsv Fixes: QTBUG-70897 Change-Id: I9ffa65a89c0abcca62bae35777ca1cbde3375180 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Qt Style Sheets: add support for hsl(a) colorsChristian Ehrlicher2018-10-181-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt stylesheets color property did not support hsl or hsla although CSS 2.1 does support it. Since QColor natively supports this color model only the color parsing needed to be adjusted. This also adds some stricter checks for a valid css color definition and prints a warning about the issue. [ChangeLog][QtGui][CSS] Added support for hsl/hsla colors Fixes: QTBUG-58804 Change-Id: Ief65a36a7e0ed0d705dc1fe5a8658e8d07fe9a13 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | 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>
* | Fix crash when detaching dangling QTextCursorEskil Abrahamsen Blomfeldt2018-09-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QTextCursor survives its QTextDocument, the internal QTextDocumentPrivate pointer is set to null. There are checks for this in all the QTextCursor functions to skip out early if such a QTextCursor is used. However, when executing the "if (d->priv)" condition in setters, this will access the non-const operator->() of QSharedDataPointer and detach the QTextCursorPrivate, and in the copy constructor of this class, there was an unprotected call into priv->addCursor(). In theory, we could cast all the checks for d->priv to avoid detaching, but in practice this doesn't matter, since the setters will typically detach anyway later on. [ChangeLog][QtGui][Text] Fixed a crash that can happen when calling a setter on a QTextCursor after its QTextDocument has been deleted. Task-number: QTBUG-70293 Change-Id: I8f6dc5bb344d1d824f673c0c220b68b7fee237a8 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-08-161-0/+18
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/plugins/platforms/xcb/qxcbbackingstore.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I4af138ffb2f5306373244523768209e8873b2798
| * Fix potential crash when showing line/paragraph separatorsEskil Abrahamsen Blomfeldt2018-08-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing line and paragraph separators at an offset from the start of the string, the end of string pointer would be incorrectly set, and we would read past the end of the string. If any part of this memory happened to match the line or paragraph separator, then we would overwrite it and have a crash. I couldn't find any reliable way to test this, since the crash depends on the contents of the memory after the string allocated by the algorithm. But with an overflow of 100 000 characters, I found that it crashed every time I ran the test. [ChangeLog][QtGui][Text] Fixed potential crash when using QTextOption::ShowLineAndParagraphSeparators. Task-number: QTBUG-69661 Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Michal Lazo <xlazom00@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-175-0/+22
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * Android: QEXPECT_FAIL tst_QTextDocument::task240325Mårten Nordheim2018-07-041-0/+4
| | | | | | | | | | | | Task-number: QTBUG-69242 Change-Id: Ib63fc17b3f8ffb73e36c77a00d55b8200d058ef1 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Android: tst_QStaticText: QEXPECT_FAIL some testsMårten Nordheim2018-06-301-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-69218 Task-number: QTBUG-69220 Change-Id: Ib41d330653cdfccc2852a337d400f29a88bdd00a Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Android: QEXPECT_FAIL in tst_QRawFont::fallbackFontsOrderMårten Nordheim2018-06-301-0/+3
| | | | | | | | | | | | Task-number: QTBUG-69217 Change-Id: Ibd78b7e2271d4066bee8e7b1224d309e5cb89132 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Android: QEXPECT_FAIL tst_QFontDatabase::condensedFontMatchingMårten Nordheim2018-06-301-0/+3
| | | | | | | | | | | | Task-number: QTBUG-69216 Change-Id: I7da5396a62b87109609749f9ef7e9a1a7b6c6db8 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * Android: tst_QFont: QEXPECT_FAIL a couple failing checksMårten Nordheim2018-06-301-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-69214 Task-number: QTBUG-69215 Change-Id: I566fe086adec059251aa367c4ef41f42e119f764 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | winrt: Fix/blacklist failing text related auto testsOliver Wolff2018-06-223-2/+20
| | | | | | | | | | | | | | | | | | 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>
* | Handle negative leading in layoutAllan Sandfeld Jensen2018-06-061-14/+9
| | | | | | | | | | | | | | | | Adjust line positions to deal with negative leading which isn't included in height of QTextLine. Change-Id: Id7918968c0f9d7e65700b9e7a08fc5d761883f22 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Improve bounding rect of QStaticText with Qt::PlainTextAllan Sandfeld Jensen2018-05-231-0/+67
| | | | | | | | | | | | | | | | | | The bounding rect was not including positive leading of the last line. This patch solves it by changing using QTextLine's setLeadingIncluded, and adds handling of negative leading to keep rendering unchanged in that case. Change-Id: I4d18b81892184bb85cd7949a5dc3fb9cfa270a26 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | macOS: Fix stretch of condensed fonts with NoFontMergingEskil Abrahamsen Blomfeldt2018-05-041-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When showing a condensed font with AnyStretch, we should not apply any stretch to the font (and if a stretch is requested, we should calculate the actual stretch based on how much the font is already stretched or condensed). This usually works as expected, however, when using QFont::NoFontMerging as the style strategy, we would scale the glyph advances by the stretch of the font since the calculated stretch of the font engine would be overwritten by the actual stretch. In the case where we use font merging, this would be done for the multi engine, so we would not get the same issue, since the text engine gets the stretch from the actual font engine and this still has the original, calculated stretch set. Note on the test: We can't use testString() for this, since it contains a space, and the test font does not have a glyph for this, so we will end up merging a different font for the space, giving us a slightly different advance. [ChangeLog][QtGui][macOS] Fixed display of condensed fonts when NoFontMerging is in use. Task-number: QTBUG-63800 Change-Id: I5b05e0dbfc8ae4b5d10c621ecb0975f53fda9483 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add more formatting to QTextDocumentWriter when writing ODF filesDaniel Savi2018-04-111-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | QTextDocumentWriter only supports a small subset of table formatting when exporting to ODF-format. This patch adds more formatting capabilities to the ODF exporter: - table border support - table alignment - table width - respect column constraints (column widths) - add a tab before soft line breaks. This will avoid causing the last line to stretch all over the cell in justified paragraphs. With this patch, line height settings are now exported, too. [ChangeLog][QtGui][QDocumentWriter] QDocumentWriter now supports table borders, table alignment, table width, column widths, line height and image resolution when exporting QTextDocuments to ODF files. Task-number: QTBUG-63581 Change-Id: I2d269ef0f842e73af64d48bfef531d5fa3078088 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-0/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * CoreText: Make sure to keep reference to data when cloning raw font engineTor Arne Vestbø2018-02-071-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngine::cloneWithSize() is used by QRawFont internally when switching a raw-font from one size to another using setPixelSize. For CoreText, we use a subclass of QCoreTextFontEngine to keep track of the QByteArray data of a raw-font, but failed to overload cloneWithSize, so we would lose the data whenever setPixelSize was called, resulting in missing text rendering in QtWebKit. We now retain the data as we should. Task-number: QTBUG-65923 Change-Id: I7d4186a3c32a61d48d1e9388e43f2792e8e46081 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | qtbase: cleanup BLACKLIST filesChristian Ehrlicher2018-02-132-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup BLACKLIST files which contain entries for CI-systems which are no longer active: - opensuse-13.1 - opensuse-42.1 - osx-10.8 - osx-10.9 - osx-10.10 - rhel-7.1 - rhel-7.2 - rhel-7.3 - ubuntu-14.04 - windows msvc-2010 Change-Id: I25590b0807a4454f9dc92aa4ea61300f7c9af56b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | qtbase: Remove BLACKLIST files which are no longer activeChristian Ehrlicher2018-02-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove BLACKLIST files which are no longer valid because the mentioned CI systems are no longer active: - opensuse-13.1 - opensuse-42.1 - rhel-7.1 - rhel-7.2 - rhel-7.3 - ubuntu-14.04 or the testcases are no longer available: - QTBUG_14292_filesystem in qactiongroup Change-Id: I80a4397059fafba169096440fdc07d45c76a1ed8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Fix explicitly set width not being respectedIgor Mironchik2018-01-201-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of the QStaticText was always adjusted, even if setTextWidth() was used. Now size of the QStaticText is calculated according to the set width of the text, and if no width was set, then the automatically adjusted size is used. [ChangeLog][QtGui][QStaticText] Fixed explicitly set width not being respected. Task-number: QTBUG-65836 Change-Id: If2f9f6952fb168f4bcb6d8fabfdc7360f8a36485 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-111-1/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-091-1/+36
| |\| | | | | | | | | | Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
| | * CoreText: Order fallback fonts based on writing system supportEskil Abrahamsen Blomfeldt2018-01-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After we stopped sanitizing the fallback font list (with change 6ca48a847a1805c3826004c5b989b4ae14397a37), we now need to make sure it is ordered so that the fonts that support the writing system in question are always tested first, otherwise we can end up loading a lot of fonts that will never be used. Task-number: QTBUG-65605 Change-Id: Id2a65bbff3e64e6d6e6b4f72500778ee3e811e84 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * Fix fallback fonts for non-common writing systemEskil Abrahamsen Blomfeldt2018-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we request fallback fonts, we cannot discriminate the fonts based on the writing system support. This is especially important since common script is now merged with other scripts, meaning that a common script character will always go through the fallback mechanism when not supported by the main font. When drawing for instance a string of Devanagari characters on macOS, we would get a list of 33 fallback fonts, but almost all of them would be the default Devanagari font, since none of the other fallbacks would support that script. Meaning that we would just check the same font over and over, which makes no sense. The fallback list has been retrieved specifically for the given script, so we do not need to consider that when fetching the fonts. For most of the common set, we will not have noticed the bug, because at least one of the writing system-specific fallbacks will have had support for latin characters as well. But when trying to mix emojis and some non-common script, we would get a box in place of the emoji, which had been adopted to the main script and would only be looked for in the fonts supporting this. Note that this exposed an issue with the QRawFont test on some systems. When the sample text contained a space, it would be possible to get a fallback font for this character, since we now effectively support fallbacks. This is not the correct behavior, but it is unrelated to this fix, and it was not what the QRawFont::unsupportedWritingSystem() test was written to check. I have therefore removed the space from the sample text to make the test pass, and will make a separate task of fixing the issue of merging fonts for whitespace characters. [ChangeLog][QtGui][Text] Fixed a bug where mixing different writing systems with emojis could lead to missing glyphs. Task-number: QTBUG-61882 Change-Id: I00f6043bb01af1f2277723ccf643034aebf3e18f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Update font when text format's letter spacing type is changedEskil Abrahamsen Blomfeldt2017-12-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextFormat::FontLetterSpacingType property was added outside the span of the FirstFontProperty and LastFontProperty, so the fontDirty flag would not be set when it was changed. There is no binary compatible way to fix this before Qt 6, so for now, we add a special case for it. [ChangeLog][QtGui][Text] Fixed an issue where changing the letter spacing type of a QTextCharFormat would not cause its font to update. Task-number: QTBUG-65345 Change-Id: I5ab53d7f82d529b57edceacfc3fa688c6741cd17 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: C. Boemann <cbo@boemann.dk> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-085-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-10/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add QFontMetrics(F)::horizontalAdvance() functionEskil Abrahamsen Blomfeldt2017-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove references to obsolete platformsJake Petroules2017-11-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-7/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Blacklist tst_QFont::DefaultFamily in B2QtTony Sarajärvi2017-08-161-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-62528 Change-Id: Iadf9a923b2a624c5082fd1bd61691f8100178f94 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Revert "Ignore thaiZWJ failure on RHEL 7.2"Simon Hausmann2017-08-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | The blacklisting is not needed anymore as we now use -qt-harfbuzz. This reverts commit b36e5faad49009778cea873ab30906bf212fc8b8. Task-number: QTQAINFRA-1363 Change-Id: I3ae50588204b27e6880416ae2cbc28dda53bb292 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| * Ignore thaiZWJ failure on RHEL 7.2Simon Hausmann2017-08-041-0/+2
| | | | | | | | | | | | | | | | The test fails when the system harfbuzz (version 1.3.2) is installed. Change-Id: Id18a5a3c503f64ef56567d71655e433a46908b3f Task-number: QTQAINFRA-1363 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Add QTextOption/QTextEdit/QPlainTextEdit::tabStopDistance propertyEskil Abrahamsen Blomfeldt2017-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt, we have QTextOption::tabStop, QTextEdit::tabStopWidth and QPlainTextEdit::tabStopWidth. Neither are very good names, since the tab stop is neither a numerical value as in the former, nor does it have any dimensions that can be measured, as in the latter. Vertical text advances may also be supported by Qt at some point in the future, at which point the name would make even less sense. At the same time, we expose the actual type of the tab stop distance as floating point in the QTextEdit and QPlainTextEdit API instead of always rounding it to an int. To avoid duplicating either of these APIs in Qt Quick, we introduce tabStopDistance as the common term instead and deprecate the old names. [ChangeLog][Text] Introduced tabStopDistance property in QTextOption, QTextEdit and QPlainTextEdit as replacement for the inconsistently named tabStop and tabStopWidth properties. QTextOption::tabStop, QTextEdit::tabStopWidth and QPlainTextEdit::tabStopWidth have subsequently been deprecated. Change-Id: Ib7e01387910cddb58adaaaadcd56c0e69edc4bc2 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Ignore thaiZWJ failure on RHEL 7.2Simon Hausmann2017-08-041-0/+2
| | | | | | | | | | | | | | | | The test fails when the system harfbuzz (version 1.3.2) is installed. Change-Id: Id18a5a3c503f64ef56567d71655e433a46908b3f Task-number: QTQAINFRA-1363 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Add API to disable text shaping on fontsEskil Abrahamsen Blomfeldt2017-07-262-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-1/+1
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * winrt: Use styleHint as clue for fallbacks for font familiesOliver Wolff2017-06-011-1/+1
| | | | | | | | | | | | | | | | Similar on how it is done for Windows desktop we also use the given style hint when building the list of fallbacks a font family. Change-Id: I71378581d07f20ebe5bf0bc757bba919cc70e118 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Fix CSS line-height property multiplier value handlingJoni Poikelin2017-04-211-0/+49
|/ | | | | | | | | | | | | | | CSS style such as "line-height: 1.5;" should be used as a multiplier, but Qt uses it as percentage which makes line spacing way too small. To workaround this, convert it to percent and use as QTextBlockFormat::ProportionalHeight instead. [ChangeLog][QtGui][Important Behvior Changes] Changed CSS line-height property with multiplier to follow CSS spec Task-number: QTBUG-56848 Task-number: QTCREATORBUG-17683 Change-Id: Icc98f7c0d4d07542a220702c287f23fa450ef875 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>