79b2a43585
Provide basic boiler plate that sets up the baseline (aka lancelot) framework specifically for comparing the appearance of widgets, and implement test functions for QSlider and QPushButton. Widgets should always look the same if the QPA platform, the OS version, and certain UI-impacting attributes are identical. Ie. on any macOS 10.15 machine that runs in "Light" mode, widgets look the same. On a macOS 11 machine, they might look different. On an OpenSUSE machine using the fusion style things might look different from a Ubuntu machine. The helper function removes DPR differences - images are always scaled to a DPR of 1.0, which allows us to compare the image\ content and not get distracted by them having different dimensions (and the fuzzy comparison of images might make the system tolerate scaling artefacts). Note: For now, this test is meant to be run locally, either when testing changes to style code, or when checking how QWidget based UIs would look on newer version of an operating system. In CI the test is run, but then skipped in CI as the baseline server is not configured. Change-Id: Ie33a9d979d934f0df6883757333ce2c5e2f7ef84 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
13 lines
360 B
CMake
13 lines
360 B
CMake
qt_internal_add_test(tst_baseline_widgets
|
|
SOURCES
|
|
../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp
|
|
../shared/qbaselinetest.cpp ../shared/qbaselinetest.h
|
|
tst_baseline_widgets.cpp
|
|
INCLUDE_DIRECTORIES
|
|
../shared
|
|
PUBLIC_LIBRARIES
|
|
Qt::Gui
|
|
Qt::Widgets
|
|
Qt::Network
|
|
)
|