summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
Commit message (Collapse)AuthorAgeFilesLines
* QtGui/math3d : Fix QQuaternion::getEulerAnglesInho Lee2021-06-011-8/+28
| | | | | | | | | | | | When rotating M_PI_2 based on x-axis, quaternion to euler conversion makes NaN for the x-rotation value. This patch fixes this corner case. Fixes: QTBUG-93600 Change-Id: Ice321a80ad90dba9cf3ee3a14ec7d3d047c21bd3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 7ea2fbddcf674d49ad7d219cdb8a4b760258360c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFileSystemModel fails to locate a host from root's visible childrenDongmei Wang2021-05-221-0/+15
| | | | | | | | | | | | | | | | | | In QFileSystemModel, in some cases the hostname in a UNC path is converted to lower case and stored in the root node's visibleChildren. When QFileSystemModel sets the UNC path as the root path, it tries to get the row number for the host, but it didn't convert the hostname to lower case before getting the row number, which resulted in the host not found in the root node's visible children. As a result, it returns -1, an invalid row number. Change the behavior to find the node for the host using the host name case-insensitive and then get the row number. Fixes: QTBUG-71701 Change-Id: Ib95c7b6d2bc22fd82f2789b7004b6fc82dfcb13b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit e253a30238ed1a93877780428c035d3b7a53e22a)
* Skip a tst_QRhi test case with the Android emulatorLaszlo Agocs2021-04-011-0/+3
| | | | | | | | | | Task-number: QTBUG-92329 Task-number: QTBUG-92211 Change-Id: I63ff17b226d502189bc769b0b28640b849b8d39a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9e662a0baf46253fcb88027688587c06b7112620) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ab32956178331bd323b8341129a237ae0030387b)
* QPainterPath: fix handling of fill rulesGiuseppe D'Angelo2021-03-261-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | fillRule() contained a major blunder: instead of checking if the d-pointer was allocated, and return a default value if it wasn't, it checked whether the path contained any points. This means that QPainterPath p; p.setFillRule(x); Q_ASSERT(p.fillRule() == x); was failing. As a drive-by to test this change, fix another mistake in clear(): clear is documented to clear the elements in a path, but instead it also changed the fill rule. This commit partially reverses 697910e5fbd382e78bc1bcbac3f5824aded059b4. Change-Id: Ieb8145694b672439c3380d9ccb87d1206a2dd115 Done-with: Milian Wolff Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 0b4ccbf81ee2009051169f2f0918442b56512b20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix alpha handling of QImage::setPixelv6.0.3Allan Sandfeld Jensen2021-03-231-11/+61
| | | | | | | | | | It was treated differently depending on format, made it consistently behave the same for all formats (following the behavior of the primary formats). Change-Id: Ie24e19957d076fdf3ebd333074e26ede187489eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c32cd44d34910cfd42e32537578e4a573138a282)
* rhi: gl: Fix missing uniform data with certain command listsLaszlo Agocs2021-03-091-49/+170
| | | | | | | | | | | | | | | Following patterns from the other backends is insufficient with OpenGL because we do not use real uniform buffers. There is currently a possibility that a shader program will be bound without following it with setting uniforms. Correct this by having a second level of tracking of the associated srb object in the pipelines. Fixes: QTBUG-91630 Change-Id: I74a012daade826dd22c436bde06381c1233bad11 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 80029e0ca65d4bf4575f7a08d186c781ec6c2f0e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* And fix handling and test of QImage::fill(uint) as wellAllan Sandfeld Jensen2021-02-251-2/+8
| | | | | | | | | | Only RGB444 and RGB666 were treated slighlty different from the rest, but the test had a few additional mistakes. Change-Id: I4728b4036affedfffce8bca5c1e7be3869344fbe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit c2bec047e281d949015ecd27daf2ba2d51b21526) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix recently added auto test of text layout overflowv6.0.2Eirik Aavitsland2021-02-241-1/+2
| | | | | | | | | | Ignore width of trailing space. Fixes: QTBUG-91038 Change-Id: I74e278366a2c3b170335738bf6d6ee23933b361a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit be4127d6f747742c714914e1b313186422b438f3) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Extend colorspace testing and fix bug it uncoveredAllan Sandfeld Jensen2021-02-161-0/+119
| | | | | | | | | | | When changing transferfunction the look-up-tables needs to be regenerated. Change-Id: I83ca5fe570f85d478a374f52c0a82db84e70c3b8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit b2631c72c0628e68c0fae7567fd12e6646455efc) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix QImage::fill with semi-transparent QColorAllan Sandfeld Jensen2021-02-121-7/+31
| | | | | | | | | | A few formats were not treating the input QColor correctly. Fixed and added more exhaustive test. Change-Id: I872aeeb45e518f9a34b4ac35642264821f9927f2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 95712c5e5438e4eb5cd205ab4659febf3192137a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid overflow in text layoutEirik Aavitsland2021-02-111-0/+13
| | | | | | | | | | Fixes oss-fuzz issue 29313. Change-Id: Idbabd162fa9e0dbce687981bdbcc75be37189a61 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Robert Löhning <robert.loehning@qt.io> (cherry picked from commit bfc09b8d8fa6c1a397aff458c644ed424754adf0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle macOS 11 issues in softHyphens testAllan Sandfeld Jensen2021-02-081-17/+42
| | | | | | | | | | | Calculate the effective width of the hyphen better, and compare with ceiled sizes. Fixes: QTBUG-90698 Change-Id: I7ed2eb44c54240ecb2f8a38e5acf1f32608b2bfb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 0ffdbb21261eee3a9ec1cd541478ee883a12065c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove false Q_UNREACHABLE from shaping codeEskil Abrahamsen Blomfeldt2021-02-041-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 Change-Id: Ia0dd6a04844c9be90dcab6c464bebe339a3dab11 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> (cherry picked from commit fccd419dd632306a4bd85928223e0a56a59510ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QIcon: Use the @nx pixmaps in the paint methodBastien Bouclet2021-01-291-0/+48
| | | | | | | | | | | | Make use of the device pixel ratio in the QIcon paint method so the @nx hi-dpi pixmaps are selected when appropriate when painting to a QPainter. Fixes: QTBUG-90042 Change-Id: I53995a2285ef879e3c4fddb9f8da702e256a260f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit b69b04c4790f319104a1098147cea9405b6e7062) Reviewed-by: Bastien Bouclet <bastien.bouclet@gmail.com>
* AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinatesShawn Rutledge2021-01-141-6/+13
| | | | | | | | | | | | | | | | | | | | | | QGuiApplicationPrivate::processMouseEvent() sends a QWindowSystemInterfacePrivate::TouchEvent if the mouse event is not accepted and AA_SynthesizeTouchForUnhandledMouseEvents is enabled. A QPA TouchEvent always contains native touch points, which is why it calls QWindowSystemInterfacePrivate::fromNativeTouchPoints to translate the QMouseEvent's device-independent position back to the raw position that it would have had if it came from a real touchscreen. Therefore we must give that function touchpoints that are actually in native coordinates. It may be that some of this transformation could be avoided entirely, but here we prove that the existing way works correctly, by adding coordinate checking to the tst_QWindow::mouseToTouchTranslation() test. Task-number: QTBUG-86165 Change-Id: I4c9ca2b11e9eb76d79712c187db3eb9865da581a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit aeeac48cbdea744406f0c8abefe271f571b61d07) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove irrelevant test row, fix compiler warningVolker Hilsheimer2021-01-081-1/+0
| | | | | | | | | | | | | | | With the introduction of QKeyCombination, the result of |'ing together a set of modifiers and a key goes always through the same QKeySequence constructor, no matter the order. The implicit conversion through int when the wrong order is used causes a compiler warning as that conversion is deprecated. So remove that test case. Change-Id: I04e27bcd51723ee0efc77e52e45ca3eb8bac5fc7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 9963aaacdb8b79ed079baf6425cef3d0347c2c8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QInputControl: accept surrogate category characterLiang Qi2021-01-051-0/+46
| | | | | | | | | | See also https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs . Fixes: QTBUG-89184 Change-Id: I04eff7f42f0030346603a7b31e4ac854a477030c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit e688b99995b8c624dbcea296c99fb89262d29e15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-106-22/+43
| | | | | | | | | | And fix up some wrong qmake project files Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 2304acab5ff3bd3832c2e388cfdab27f2a95caa8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QImage::setPixelColor on RGBA64_PremultipliedAllan Sandfeld Jensen2020-12-041-0/+8
| | | | | | | | | QColors were not premultiplied before being set. Change-Id: Id3765b6932a72374ddfd788fae4bb628a4edf0b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 0c19e3f703a7c3fd59e6db8a9d4ac7091674b552) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_QFontDatabase::aliases failure with ambiguous fontEskil Abrahamsen Blomfeldt2020-12-021-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | If the first font in the families list happens to have been disambiguated because of duplicates, two things went wrong: 1. hasFamily() would return false for the font family, because it does not disambiguate when checking for the family name and only checks if the families list contains the exact string. 2. Adding aliases to the full disambiguated string is not supported, only the family name. The first issue has been reported separately as QTBUG-89068. The test failure is fixed by just avoiding the fonts that are ambiguous in the test, as it really doesn't matter which font we pick. Fixes: QTBUG-89008 Change-Id: I829778c2e7bb6090475c34dcf9cdce58862729d6 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 34fa01be82065241cd9a369ae49749422d8e7831) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compiler warning about discarded return valueVolker Hilsheimer2020-11-231-1/+1
| | | | | | | | | | Not testing the result of the copying, just verifying that it doesn't assert. Change-Id: Ib51129134b74c17eada7e3819ccfff10bb9affbf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit e59ab8b5907f87a77cc6924abab5fb1c82483856) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix weight when reading old serialized QFontsEskil Abrahamsen Blomfeldt2020-11-212-4/+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 Change-Id: I199737fed61917f8b9d8f86176ead29a89eb8e0c Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 1d14067680f02f47b2f8ff375c44eb64633eec02) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Allow QWindowsPipe{Reader,Writer} to work with foreign event loops"Kai Koehne2020-11-201-41/+0
| | | | | | | | | | | | | | This reverts commit ee122077b09430da54ca09750589b37326a22d85. Reason for revert: This causes QProcess::readAll() to sometimes return nothing after the process has ended. Fixes: QTBUG-88624 Change-Id: I34fa27ae7fb38cc7c3a1e8eb2fdae2a5775584c2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 23100ee61e33680d20f934dcbc96b57e8da29bf9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Get rid of Q_COMPILER_CONSTEXPR checksAllan Sandfeld Jensen2020-11-171-4/+0
| | | | | | | Is required now. Change-Id: I62e95929d1649ea1390392230b619bd56d2a0349 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Android: Ensure windows always have a geometry on creationPiotr Mikolajczyk2020-11-171-9/+0
| | | | | | | | | | | | | | | A QWindow created without an explicit geometry needs to pick up a default geometry in the platform plugin. If the window has a maximized of fullscreen window state, it will fill the entire available geometry of the parent window (or the screen if there's not parent window). Fixes: QTBUG-69159 Fixes: QTBUG-69156 Fixes: QTBUG-69154 Pick-to: 5.15 Change-Id: If8565d92a97bb4b3fa44757e68969d54d0bc7ebe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Allow QWindowsPipe{Reader,Writer} to work with foreign event loopsAlex Trotsenko2020-11-171-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a foreign event loop that does not enter an alertable wait state is running (which is also the case when a native dialog window is modal), pipe handlers would freeze temporarily due to their APC callbacks not being invoked. We address this problem by moving the I/O callbacks to the Windows thread pool, and only posting completion events to the main loop from there. That makes the actual I/O completely independent from any main loop, while the signal delivery works also with foreign loops (because Qt event delivery uses Windows messages, which foreign loops typically handle correctly). As a nice side effect, performance (and in particular scalability) is improved. Several other approaches have been tried: 1) Using QWinEventNotifier was about a quarter slower and scaled much worse. Additionally, it also required a rather egregious hack to handle the (pathological) case of a single thread talking to both ends of a QLocalSocket synchronously. 2) Queuing APCs from the thread pool to the main thread and also posting wake-up events to its event loop, and handling I/O on the main thread; this performed roughly like this solution , but scaled half as well, and the separate wake-up path was still deemed hacky. 3) Only posting wake-up events to the main thread from the thread pool, and still handling I/O on the main thread; this still performed comparably to 2), and the pathological case was not handled at all. 4) Using this approach for reads and that of 3) for writes was slightly faster with big amounts of data, but scaled slightly worse, and the diverging implementations were deemed not desirable. Fixes: QTBUG-64443 Change-Id: I1cd87c07db39f3b46a2683ce236d7eb67b5be549 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Android: exclude failing tests of tst_qhighdpiAssam Boudjelthia2020-11-161-0/+3
| | | | | | | | | Tests in tst_qhighdpi are crashing on Android. Task-number: QTBUG-88505 Task-number: QTBUG-87025 Change-Id: Ie1350e06fb30d90f20c550f91555f4023eee56b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: exclude tests crashing at startAssam Boudjelthia2020-11-163-2/+6
| | | | | | | | | | | These tests are failing with "java.lang.UnsatisfiedLinkError: dlopen failed: invalid ELF file" at the start, excluding them now to enable Android testing until they're fixed later. Task-number: QTBUG-87671 Task-number: QTBUG-87025 Change-Id: Ida7d7158fccdc31df1f9689f77fde832964d732f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QChar: make construction from integral explicitGiuseppe D'Angelo2020-11-151-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>
* Stop copying events in testsVolker Hilsheimer2020-11-122-39/+29
| | | | | | | | It's unnecessary, and copying QEvents is a bad practice since it's a polymorphic class. Change-Id: Ieb6de106084f838c5e6c8a0643c54fd3c7f4a7a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove Qt4Compatible paintingAllan Sandfeld Jensen2020-11-121-15/+5
| | | | | Change-Id: Ie54206ca9b509875568f2158e229fca9cb1860a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix misidentification of some shearing QTransforms as only rotatingEirik Aavitsland2020-11-111-2/+3
| | | | | | | | | The dot product used rows instead of columns. Pick-to: 5.15 5.12 Fixes: QTBUG-87984 Change-Id: I922f67ed0fa9a4f88aa4e9fc6d3c09f8dda21688 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow painting above INT16_MAX on 64-bit architecturesAllan Sandfeld Jensen2020-11-091-0/+64
| | | | | | | | | | | The logic in qgrayraster was ready for it except for an intermediate format. qrasterizer.cpp and qcosmeticstroker.cpp uses a dot-16 fixed point format, and had to be changed to handle higher coordinates on 64-bit architectures. Fixes: QTBUG-84428 Change-Id: I85ab7a04e38bd0dbcefa9f16c16ccc84785a33cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Teach QPixmapIconEngine how to handle @Nx pixmapsMorten Johan Sørvig2020-11-081-0/+45
| | | | | | | | | | | | | | | | | | | | Bring QPixmapIconEngine on par with QIconLoaderEngine when it comes to @Nx pixmap handling: Make the scale factor a test parameter during icon lookup. This allows storing e.g 16x16@1, 16x16@2, 16x16@3 versions of a pixmap in the icon, and then having QIcon select the correct one based on the target devicePixelRatio. Extend the qiconhighdpi test to also cover QPixmapIconEngine, via the addPixmap() API. The corner cases of pixmap lookup can be much complicated. QIconLoaderEngine and QPixmapIconEngine should ideally have identical behavior in order to avoid surprises. Change-Id: I17552cc61755bff9553c4a462e3983ac6759c13b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename QRangeCollection to QPageRanges, make it a proper value typeVolker Hilsheimer2020-11-087-87/+195
| | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: Blacklist tst_qwindow failing test on WindowsAlexandru Croitor2020-11-071-1/+1
| | | | | | | | | Amends b13bad3ab0de96a3c6fe6dce4b9f35649f2f37d9 Task-number: QTBUG-35109 Task-number: QTBUG-88250 Change-Id: I0b37369bb7cfc58e6968ca20969725e2f4143200 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Support the markdown underline extensionShawn Rutledge2020-11-072-8/+18
| | | | | | | | | | | | | | | | 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>
* Introduce QEvent::isSinglePointEvent()Shawn Rutledge2020-11-072-0/+3
| | | | | | | | | | | | This makes high-level event dispatching easier: for example we often need to cast an event to access getters like button() and buttons(). We can so far assume that any QPointerEvent that is not a QTouchEvent is a QSinglePointEvent; but more explicit type-checking looks safer. Implemented in a similar way as c7f727996909338c3689396160f3060480521846. Change-Id: I980d759e2a7538b6b30fd3bdc3be0c351ec6c246 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tests: Blacklist failing tests on MinGWAlexandru Croitor2020-11-061-6/+4
| | | | | | | | | Also move redudant Android entries to already existing sections. Task-number: QTBUG-35109 Task-number: QTBUG-88250 Change-Id: I9d5eaa5a3f11b55566a7c74f84a972a0c272cfea Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Set the url to have the AtNx filename if one is foundMorten Johan Sørvig2020-11-064-0/+91
| | | | | | | | | | | | | | 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>
* Android: blacklist a list of failing tests for androidAssam Boudjelthia2020-11-0411-4/+51
| | | | | | | | | | | | | | | | We want to re-enable Android tests in QTQAINFRA-3867. However, many tests are failing already preventing that from happening. QTBUG-87025 is currently keeping track (links) to all of those failing tests. The current proposal is to hide those failing tests, and enable Android test running in COIN for other tests. After, that try to fix them one by one, and at the same time we can make sure no more failing tests go unnoticed. Task-number: QTBUG-87025 Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QEventPoint::normalizedPosition() to replace normalizedPos()Shawn Rutledge2020-11-031-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 4e400369c08db251cd489fec1229398c224d02b4 we deprecated normalizedPos() because we suspect it's a legacy feature that few users will need. However Qt developers keep bringing up the continued usage in autotests over and over. (It's IMO not wrong to keep testing deprecated functions in autotests, but the warning keeps attracting attention.) Of course it will turn out that normalizedPos() has users; we just don't know how many. One way to look at it is: why should they copy a snippet of code to calculate it, when it costs us so little to continue to provide this accessor. It might also turn out that some users will complain that in Qt 5 it was passed through from the device driver (or at least from the window system API) to the application, and perhaps the replacement will not always work, for example if availableVirtualGeometry() ends up wrong, or there is some strange scenario that generates events that are out-of-bounds for the device that the event professes to come from, so that the "normalized" coordinates also go outside the [0..1] range. We reserve the right to put back the storage in QEventPointPrivate if the need arises; so that's why this function is not inline. We continue to hope that startNormalizedPos() and lastNormalizedPos() are used even less and won't be missed much, because it would be wasteful to store them all the time if only a few users need them. Change-Id: I23ed78843e3f9e16133c5b6f462884a3845f91b6 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-036-76/+49
| | | | | | | | 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>
* Update tst_qguivariant to use QMetaTypeDavid Skoland2020-10-281-2/+2
| | | | | Change-Id: I4c789ecfc9f4613bd4820a8a6530249c51344a83 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate QVariant::TypeLars Knoll2020-10-232-3/+3
| | | | | | | | | 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>
* Rename the QMetaType::MovableType flag to RelocatableTypeLars Knoll2020-10-231-1/+1
| | | | | | | Keep this in sync with the changes we have done in QTypeInfo. Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QPointer comparisons hidden friendsAllan Sandfeld Jensen2020-10-231-3/+3
| | | | | | | Reduces ADL noise. Change-Id: Id0aa4b32b7bb6d70ed9106b949452d895d9060a9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make QEvent::setAccepted() virtual; set QEventPoints state the sameShawn Rutledge2020-10-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick, when we deliver an item-specific QTouchEvent that contains only the subset of eventpoints that are inside the Item's bounds, traditionally the Item can accept the event to tell the delivery logic that the event is handled and doesn't need to be delivered further. But an Item cannot be expected to have total scene awareness; so now, the delivery is "done" only when all eventpoints in the original event are accepted. This behavior has been working well enough already due to logic in QQuickWindow that iterates the points and accepts them if the event is accepted; but it seems appropriate to move this enforcement into QPointerEvent itself. Making setAccepted() virtual gives us a useful degree of freedom. Event-handling code should alternatively use QEventPoint:setAccepted() or QPointerEvent::setExclusiveGrabber() to take resonsibility for only a subset of the touchpoints. Another way to put it is that we treat QPointerEvent::setAccepted() as a convenience method: accepting the QEventPoints is what counts (at least in Qt Quick). Change-Id: Icec42dc980f407bb5116f5c0852c051a4521105a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix a bunch of compiler warnings in event handling test casesVolker Hilsheimer2020-10-221-9/+12
| | | | | | | | Leave the normalizedPos warnings, there is no equivalent function. Change-Id: I50c72ab24b4855e36941aafdee30cdb0e94c1684 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* [Android] Make sure expose events are emitted after window resizePiotr Mikolajczyk2020-10-211-3/+0
| | | | | | | | | | | | Expose event would not be sent when window was resized Fixes: QTBUG-69155 Pick-to: 5.15 Change-Id: I81bf2d54f830a0dabf15398e1f25b55ff7ff4479 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>