Commit Graph

1539 Commits

Author SHA1 Message Date
Alexandru Croitor
cd258ca28a Regenerate tests/auto/gui/image
Change-Id: If6aa42d5b19227e488fc2fcf94b8eacc02c2c209
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 10:04:49 +00:00
Leander Beernaert
56115dba42 Convert remaining gui utils tests
Fixes:QTBUG-78229

Change-Id: I3bff1b562e1c146f291e5692c90d2c38f162d395
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-04 13:36:46 +00:00
Frederik Gladhorn
e7118bd7fd cmake: add tests/auto/gui/text
Fixes: QTBUG-78228
Change-Id: I3d4666a553e94de47e01d64551b8fe672994b137
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-01 13:28:59 +00:00
Frederik Gladhorn
8931f4fe5f cmake: fix tests/auto/gui/kernel/qguieventloop
The include does not join the required libraries. When building the
tests in a separate build directory this works for some reason (that's
why the CI doesn't catch it). Building everything top level breaks
though.

Considering this happens in maybe two places, I'm not sure it's worth
the effort of fixing the porting scripts.

Change-Id: I104ab9717257cbe8dfd5112dffd0d0b002cdb09e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-01 13:01:21 +00:00
Frederik Gladhorn
48c56a992e cmake: re-generate auto/gui/kernel/qguieventloop
The target naming has been fixed, it used to be taken from the include,
but now that we added the real tst_qeventloop we have a name clash.

All that's needed to fix the situation is regeneration of this cmake list.

Change-Id: Id336906f30494dfa92cf5e2812f8b1a8771a992f
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-01 08:50:45 +00:00
Frederik Gladhorn
045bb3df92 cmake: add gui/kernel tests
Fixes: QTBUG-78224
Change-Id: I9e6294b5035b066dead0f5ff91f81e472bc56d62
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-31 09:49:30 +00:00
Leander Beernaert
b0aee08ff6 Convert qvulkan test
Change-Id: I395fa1c08bb67d65604962883dce3b390c604b9c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 12:05:17 +00:00
Leander Beernaert
c3de886b61 Port qopengl and qopenglconfig tests
Change-Id: Ic3b61fb7f23cb884552126038d0bdf289d0cbc6a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 12:04:59 +00:00
Leander Beernaert
1fa03ced47 Port rhi tests
Change-Id: I3bf5731696a0647bf0e62758eb3d1742ba097041
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-10-28 12:04:46 +00:00
Frederik Gladhorn
d784864b58 cmake: add gui/image tests
Fixes: QTBUG-78223
Change-Id: I9a5c90bb664e3baa4481e6bdaa9a4990e3f68317
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-23 07:56:08 +00:00
Simon Hausmann
02164e0288 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
2019-10-17 09:41:36 +02:00
Qt Forward Merge Bot
6f27bb1352 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
2019-10-17 01:01:01 +02:00
Qt Forward Merge Bot
faab18c65a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
2019-10-16 01:00:49 +02:00
Sona Kurazyan
9cc040a806 Prepare for deprecating the QDesktopWidget
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.

Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()

Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-15 20:09:29 +02:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Qt Forward Merge Bot
e164d61ca8 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
2019-10-14 01:00:34 +02:00
Qt Forward Merge Bot
8d8140dffa Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
2019-10-13 01:00:43 +02:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Qt Forward Merge Bot
50d41f14ee Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I14f539ccfa4ab6e21188b98c314bdb030f3b9f70
2019-10-11 01:01:15 +02:00
Shawn Rutledge
f1dd6addda Make QTextBlockFormat::MarkerType an enum class
This came up during API review.

Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-10-10 21:08:08 +02:00
Liang Qi
9c84b7786c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/plugins/platforms/xcb/qxcbscreen.h
	src/src.pro

Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
2019-10-10 09:13:49 +02:00
Qt Forward Merge Bot
68375b4f3d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iadeca81f499d6b19e86ceae1edd7960db2575e90
2019-10-10 09:10:27 +02:00
Laszlo Agocs
b62b80706e rhi: Autotest for rendering a triangle into a window
Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
df0b1836b5 rhi: Autotest rendering with uniform buffer
Change-Id: I4251f31494680c78e90a08a2b471cb1af08ecd81
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
b2de7f8583 rhi: Autotest rendering a textured quad
Task-number: QTBUG-78971
Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:06 +02:00
Laszlo Agocs
8f44da1f55 rhi: Enable the qrhi autotest on WinRT
There is no onscreen support for WinRT in the D3D11 backend yet.
However, offscreen operations (rendering into a texture) should work.
One catch is that there is no D3DCompile available for deployed WinRT
apps. So ship the intermediate format (DXBC output from fxc) in the
.qsb files.

Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
dd105fab8d rhi: Autotest rendering a triangle
Also improve (docs and runtime checks) and test the minimum set
of required data to create a graphics pipeline.

Task-number: QTBUG-78971
Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
9baf69c765 rhi: gl: Add a feature flag for reading back non-zero mip levels
The joys of "level - Specifies the mipmap level of the texture
image to be attached, which must be 0." for glFramebufferTexture2D
in OpenGL ES 2.0.

Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
9c466946d0 rhi: Autotest basic texture operations
...and make the Null backend able to deal with these, for RGBA8 textures
at least. Naturally it is all QImage and QPainter under the hood.

Also fix a bug in the OpenGL backend, as discovered by the autotest:
the size from the readback did not reflect the mip level.

Task-number: QTBUG-78971
Change-Id: Ie424b268bf5feb09021099b67068f4418a9b583e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Laszlo Agocs
89ec1b3618 rhi: Add support for buffer readbacks
This also marks the beginnings of significantly extending autotesting
of the resource and rendering functionality in QRhi.

Also involves fixing up the buffer operation lists like we did
for textures before. This is to ensure updates and reads on the
same batch execute in the correct order. So just have two lists:
one with buffer, one with texture operations.

Also simplify the struct layouts. No need for those inner structs
with many duplicate members. This reduces the size even, since using a
union was never an option here. Also switch to a VLA, the size is around
253 KB per batch.

The Null backend now keeps track of the QRhiBuffer data so it can return
valid results in readbacks.

Task-number: QTBUG-78984
Task-number: QTBUG-78986
Task-number: QTBUG-78971
Task-number: QTBUG-78883
Change-Id: I9694bd7fec523a4e71cf8a5c77c828123ebbb3bd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 15:15:05 +00:00
Laszlo Agocs
4a3ee77f65 rhi: Exercise nativeHandles() in qrhi test
Task-number: QTBUG-78971
Task-number: QTBUG-78972
Change-Id: Ibce10caf1ccd74ae7efead9579f4a4342ef896b8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-10-09 17:15:05 +02:00
Lars Knoll
ba26496647 Don't crash when calling jumpToFrame() on an empty QMovie
Properly return an invalid frame when calling jumpToFrame()
with a non existent frame number.

Fixes: QTBUG-79029
Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-10-09 15:58:26 +02:00
Simon Hausmann
3598ffcc26 Disable tests with qemu-arm & developer-build configurations in the CI
After commit b88acae7a8e773c307e44f84da037d01d19e60f7 in qt5, the
developer-build enabled qemu-arm tests were disabled and after that
changes were introduced in qtbase that would make tests fail (such as
qtextmarkdownwriter or tst_QSocks5SocketEngine). These tests would still
be run when another repository enables qemu-arm developer builds, such
as qtdeclarative. This patch removes that test coverage.

We can't really change the behavior of the CI to not run tests in
dependent repos when a repo adds test configurations (such as
qtdeclarative.yaml) as that in turn would remove the test coverage that
qt5.yaml adds over default.yaml.

Also amends d225f73c09

Change-Id: I05bdeac7fffbbfcc2be7904cb06067897958f30d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-03 15:12:33 +00:00
Simon Hausmann
dcecaeb7b9 Prospective fix to stabilize tst_qwindow::isActive() on Windows 10
It is conceivable that during the try-compare loop of processing
windowing system events we loose and regain the focus. That would
explain the occasional test failure where instead of the expected 3
focus in events, we have received four.

Task-number: QTBUG-77769
Change-Id: I2221440d09a74d4d18a72f7786232b4491cf45a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 56f084781e)
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-03 15:09:16 +00:00
Simon Hausmann
d225f73c09 Blacklist markdownwriter also on boot2qt
Task-number: QTBUG-78950
Change-Id: Ia5cb8e38d9e9edf75ded253160852b0ede42f75c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-10-02 19:27:08 +02:00
Qt Forward Merge Bot
4c8814a341 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
2019-10-02 08:39:15 +02:00
Qt Forward Merge Bot
8791a8398a Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-10-01 11:47:42 +02:00
Simon Hausmann
56f084781e Prospective fix to stabilize tst_qwindow::isActive() on Windows 10
It is conceivable that during the try-compare loop of processing
windowing system events we loose and regain the focus. That would
explain the occasional test failure where instead of the expected 3
focus in events, we have received four.

Task-number: QTBUG-77769
Change-Id: I2221440d09a74d4d18a72f7786232b4491cf45a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-01 11:47:37 +02:00
Qt Forward Merge Bot
4e40c54a3c Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I77ba01f09b3dbcaf13cb265a70d9da661c32a61f
2019-10-01 01:01:20 +02:00
Liang Qi
6f9a215cc4 Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-30 20:07:25 +02:00
Edward Welbourne
4bd6cd1992 Featurize support for signaling NaN
One of our compilers for emscripten coerces all signaling NaNs to
quiet ones, so won't do any actual signaling. Anyone relying on them
to do so shall be disappointed, so it's better that they know about it
at compile-time - or, at least, have the ability to find it out.

Put the signaling NaN producers (and remaining (test) code using them)
under the control of a feature that's disabled when numeric_limits
claims double has no signaling NaN. Assume the bootstrap library
doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no
contexpr way to test that alleged signalling and quiet NaNs are
actually distinct.

Added some auto-tests for signaling NaN, including that it's distinct
from quiet NaN. Any platform on which the last fails should disable
this feature.

Task-number: QTBUG-77967
Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-09-30 20:05:42 +02:00
Liang Qi
99cdd5fc67 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/global/qrandom.cpp
	src/corelib/io/qfileinfo.cpp
	src/corelib/kernel/qeventdispatcher_win.cpp
	src/corelib/kernel/qeventdispatcher_win_p.h
	src/gui/text/qfontdatabase.cpp
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/testlib/qtestcase.cpp

Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
2019-09-30 14:43:02 +02:00
Friedemann Kleint
e7272ee9bd Re-enable tst_QOpenGLWindow on Win32
The test was found crashing with software rendering in Qt 5.7.

Removing the insignification revealed that there are failures
on WinRT as well, blacklist them for the moment.

Task-number: QTBUG-78802
Fixes: QTBUG-49630
Change-Id: Ib1a3efe69d7b63cdd98c6da364ab09e0e2dbdf62
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2019-09-27 20:41:55 +02:00
Shawn Rutledge
06cc5d3071 Ensure that QFont::fromString() doesn't parse empty font specifications
Fixes: QTBUG-78236
Change-Id: Iba060e7a24080cdc8f317ecb6dc616b2cd918acb
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-24 14:38:40 +02:00
Simon Hausmann
e3888dd932 Merge remote-tracking branch 'origin/wip/qt6' into dev
Conflicts:
	src/gui/image/qpicture.cpp

Change-Id: Iecf79f96f54dc23bd703e6c4c634f909b796d7b3
2019-09-18 08:30:11 +02:00
Qt Forward Merge Bot
73bce0411d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4d7f0e35f4a6ccb6d5494f947fd82fc276feadd3
2019-09-17 01:00:15 +02:00
Tor Arne Vestbø
7f0faddf9f CoreText: Modernize style hint fallback lookup
The DefaultFontFallbacks.plist system file that we used for looking up
style fallbacks does not exists in macOS 10.15, nor did it ever exists
on iOS. Instead of relying on this file, we hard-code a set of default
families, that we then look up the fallbacks for.

The result of QFont::defaultFamily() on macOS is now:

  QFont::Helvetica --> "Helvetica"
  QFont::Times --> "Times New Roman"
  QFont::Courier --> "American Typewriter"
  QFont::OldEnglish --> ""
  QFont::System --> "Lucida Grande"
  QFont::AnyStyle --> "Lucida Grande"
  QFont::Cursive --> "Apple Chancery"
  QFont::Monospace --> "Menlo"
  QFont::Fantasy --> "Zapfino"

And on iOS:

  QFont::Helvetica --> "Helvetica"
  QFont::Times --> "Times New Roman"
  QFont::Courier --> "American Typewriter"
  QFont::OldEnglish --> ""
  QFont::System --> "Helvetica"
  QFont::AnyStyle --> "Helvetica"
  QFont::Cursive --> ""
  QFont::Monospace --> "Menlo"
  QFont::Fantasy --> "Zapfino"

Fixes: QTBUG-78240
Change-Id: Ie9bc13c9c1031d89f024199e4736a046c568a48d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-16 11:26:07 +02:00
Friedemann Kleint
147a8bc4c8 tst_QWindow: Remove usages of deprecated QWSI API
Use the standard testlib helpers for generating clicks and port the
remaining occurrences to the new versions of
QWindowSystemInterface::handleMouseEvent(). Similarly, fix
QWindowSystemInterface::handleTabletEvent().

Task-number: QTBUG-76491
Change-Id: I6a30957164891b56a018696606956c3cab56047f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-09-14 11:39:29 +02:00
Qt Forward Merge Bot
dc4ecf0641 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ie69d40d2efc5559b31e28ba71f88e3cda741e051
2019-09-11 01:00:09 +02:00
Liang Qi
7df0868ad5 cmake: enable tst_qpixmapcache
To verify -DFEATURE_developer_build=ON and QT_FEATURE_private_tests
work as we expected.

Change-Id: Id428dc0da4ee441b3a1a7f433c5bc2ef066dae9e
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-10 14:23:23 +00:00