qt5base-lts/tests
Volker Hilsheimer 980795dc55 Let QScreen::grabWindow's winId parameter default to 0 and add test
The platform plugins are implemented to grab the entire screen if
no window ID is provided. They do not grab the entire virtual
screen, just the screen the method is called on.

On macOS, the implementation ignored the window parameter, and
always grabbed the entire virtual screen. This change fixes the
cocoa implementation. The test passes in local tests (with two
displays with different dpr). Since grabbing a screen returns an
image with managed colors, we need to convert it to sRGB color
spec first, otherwise displaying a grabbed image will produce
different results. This will need to be changed once Qt supports
a fully color managed flow.

The test does not cover the case where a window spans multiple
displays, since this is generally not supported at least on macOS.
The code that exists in QCocoaScreen to handle that case is
untested, but with the exception of the optimization it is also
unchanged.

Done-with: Morten Sørvig <morten.sorvig@qt.io>
Change-Id: I8ac1233e56d559230ff9e10111abfb6227431e8c
Fixes: QTBUG-84876
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-01 07:09:24 +02:00
..
auto Let QScreen::grabWindow's winId parameter default to 0 and add test 2020-07-01 07:09:24 +02:00
baselineserver Use QList instead of QVector in benchmarks tests 2020-06-25 10:13:31 +02:00
benchmarks Use QList instead of QVector in benchmarks tests 2020-06-25 10:13:31 +02:00
global
libfuzzer Fuzzing: Add fuzz target for QCryptographicHash::result 2020-06-26 14:41:42 +02:00
manual QFileDialog: remove deprecated mode QFileDialog::DirectoryOnly 2020-06-26 22:40:34 +02:00
shared Remove winrt 2020-06-06 20:25:49 +02:00
testserver Fix perl script warning 2020-03-19 14:15:04 +00:00
.prev_CMakeLists.txt Make standalone tests build via top level repo project 2019-11-08 15:42:32 +00:00
CMakeLists.txt CMake: Handle finding of OpenSSL headers correctly 2020-04-08 22:03:24 +02:00
README
tests.pro

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.