summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/CMakeLists.txt3
-rw-r--r--tests/auto/gui/image/CMakeLists.txt3
-rw-r--r--tests/auto/gui/image/qicoimageformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qicon/CMakeLists.txt7
-rw-r--r--tests/auto/gui/image/qiconhighdpi/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimage/CMakeLists.txt9
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp23
-rw-r--r--tests/auto/gui/image/qimageiohandler/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimagereader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimagewriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp2
-rw-r--r--tests/auto/gui/image/qmovie/CMakeLists.txt7
-rw-r--r--tests/auto/gui/image/qpicture/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qpixmap/CMakeLists.txt9
-rw-r--r--tests/auto/gui/image/qpixmapcache/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/CMakeLists.txt3
-rw-r--r--tests/auto/gui/itemmodels/qfilesystemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/noqteventloop/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qaction/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qactiongroup/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qbackingstore/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp5
-rw-r--r--tests/auto/gui/kernel/qclipboard/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qcursor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qdrag/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qevent/tst_qevent.cpp8
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguiapplication/BLACKLIST4
-rw-r--r--tests/auto/gui/kernel/qguiapplication/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp9
-rw-r--r--tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguieventloop/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qguimetatype/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp74
-rw-r--r--tests/auto/gui/kernel/qguitimer/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguivariant/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qhighdpi/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp58
-rw-r--r--tests/auto/gui/kernel/qinputdevice/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qinputmethod/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qkeyevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qkeysequence/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qmouseevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qpalette/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp12
-rw-r--r--tests/auto/gui/kernel/qpixelformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qscreen/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qshortcut/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qtouchevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp17
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST5
-rw-r--r--tests/auto/gui/kernel/qwindow/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp120
-rw-r--r--tests/auto/gui/math3d/CMakeLists.txt3
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt5
-rw-r--r--tests/auto/gui/math3d/qquaternion/CMakeLists.txt5
-rw-r--r--tests/auto/gui/math3d/qvectornd/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/CMakeLists.txt3
-rw-r--r--tests/auto/gui/painting/qbrush/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qcolor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qcolorspace/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qcolortransform/CMakeLists.txt6
-rw-r--r--tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp199
-rw-r--r--tests/auto/gui/painting/qpagelayout/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpageranges/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpagesize/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpaintengine/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpainter/CMakeLists.txt7
-rw-r--r--tests/auto/gui/painting/qpainterpath/BLACKLIST2
-rw-r--r--tests/auto/gui/painting/qpainterpath/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpathclipper/CMakeLists.txt7
-rw-r--r--tests/auto/gui/painting/qpdfwriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpen/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpolygon/CMakeLists.txt7
-rw-r--r--tests/auto/gui/painting/qregion/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qtransform/CMakeLists.txt7
-rw-r--r--tests/auto/gui/platform/CMakeLists.txt3
-rw-r--r--tests/auto/gui/platform/qx11info/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qopengl/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp11
-rw-r--r--tests/auto/gui/qopenglconfig/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qvulkan/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qvulkan/tst_qvulkan.cpp16
-rw-r--r--tests/auto/gui/rhi/CMakeLists.txt3
-rw-r--r--tests/auto/gui/rhi/qrhi/CMakeLists.txt5
-rw-r--r--tests/auto/gui/rhi/qrhi/tst_qrhi.cpp49
-rw-r--r--tests/auto/gui/rhi/qshader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/rhi/qshader/tst_qshader.cpp11
-rw-r--r--tests/auto/gui/text/CMakeLists.txt3
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qcssparser/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qfont/BLACKLIST2
-rw-r--r--tests/auto/gui/text/qfont/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp5
-rw-r--r--tests/auto/gui/text/qfontcache/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qfontdatabase/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qfontmetrics/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qglyphrun/BLACKLIST1
-rw-r--r--tests/auto/gui/text/qglyphrun/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qinputcontrol/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qrawfont/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qstatictext/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp27
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtextblock/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextcursor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocument/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp41
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtextformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp10
-rw-r--r--tests/auto/gui/text/qtextlayout/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextlist/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md3
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/example.md2
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/links.md3
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp3
-rw-r--r--tests/auto/gui/text/qtextobject/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtextodfwriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextpiecetable/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextscriptengine/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt6
-rw-r--r--tests/auto/gui/text/qtexttable/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qzip/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/CMakeLists.txt3
-rw-r--r--tests/auto/gui/util/qdesktopservices/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qdoublevalidator/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp1
-rw-r--r--tests/auto/gui/util/qintvalidator/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qtexturefilereader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundogroup/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundostack/CMakeLists.txt5
153 files changed, 1043 insertions, 318 deletions
diff --git a/tests/auto/gui/CMakeLists.txt b/tests/auto/gui/CMakeLists.txt
index 7ba124952d..eb04989f7b 100644
--- a/tests/auto/gui/CMakeLists.txt
+++ b/tests/auto/gui/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from gui.pro.
add_subdirectory(kernel)
diff --git a/tests/auto/gui/image/CMakeLists.txt b/tests/auto/gui/image/CMakeLists.txt
index 27916d0409..73f4e9b107 100644
--- a/tests/auto/gui/image/CMakeLists.txt
+++ b/tests/auto/gui/image/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from image.pro.
# QTBUG-87669 # special case
diff --git a/tests/auto/gui/image/qicoimageformat/CMakeLists.txt b/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
index 9e77aad1fe..01678a618b 100644
--- a/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
+++ b/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qicoimageformat.pro.
#####################################################################
@@ -13,7 +16,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qicoimageformat
SOURCES
tst_qicoimageformat.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${test_data}
)
diff --git a/tests/auto/gui/image/qicon/CMakeLists.txt b/tests/auto/gui/image/qicon/CMakeLists.txt
index 5f6b139205..2531dacdc9 100644
--- a/tests/auto/gui/image/qicon/CMakeLists.txt
+++ b/tests/auto/gui/image/qicon/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qicon.pro.
#####################################################################
@@ -33,7 +36,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qicon
SOURCES
tst_qicon.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${test_data}
)
@@ -91,6 +94,6 @@ qt_internal_add_resource(tst_qicon "qmake_immediate"
#####################################################################
qt_internal_extend_target(tst_qicon CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt b/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
index 989cf1f44d..4cf05f08af 100644
--- a/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
+++ b/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qiconhighdpi.pro.
#####################################################################
@@ -13,7 +16,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qiconhighdpi
SOURCES
tst_qiconhighdpi.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${test_data}
)
diff --git a/tests/auto/gui/image/qimage/CMakeLists.txt b/tests/auto/gui/image/qimage/CMakeLists.txt
index 60c6267463..0677a437d7 100644
--- a/tests/auto/gui/image/qimage/CMakeLists.txt
+++ b/tests/auto/gui/image/qimage/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qimage.pro.
#####################################################################
@@ -13,7 +16,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qimage
SOURCES
tst_qimage.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -21,12 +24,12 @@ qt_internal_add_test(tst_qimage
)
qt_internal_extend_target(tst_qimage CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
gdi32
user32
)
qt_internal_extend_target(tst_qimage CONDITION APPLE
- PUBLIC_LIBRARIES
+ LIBRARIES
${FWCoreGraphics}
)
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 5b11a672fb..898345e44a 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -226,6 +226,8 @@ private slots:
void largeFillScale();
void largeRasterScale();
+ void metadataChangeWithReadOnlyPixels();
+
#if defined(Q_OS_WIN)
void toWinHBITMAP_data();
void toWinHBITMAP();
@@ -3433,6 +3435,9 @@ void tst_QImage::exifInvalidData()
void tst_QImage::exifReadComments()
{
+#ifdef QT_NO_IMAGEIO_TEXT_LOADING
+ QSKIP("Reading text from image file is configured off");
+#endif
QImage image;
QVERIFY(image.load(m_prefix + "jpeg_exif_utf8_comment.jpg"));
QVERIFY(!image.isNull());
@@ -4038,6 +4043,24 @@ void tst_QImage::largeRasterScale()
// image.save("largeRasterScale.png", "PNG");
}
+void tst_QImage::metadataChangeWithReadOnlyPixels()
+{
+ const QRgb data[3] = { qRgb(255, 0, 0), qRgb(0, 255, 0), qRgb(0, 0, 255) };
+ QImage image((const uchar *)data, 3, 1, QImage::Format_RGB32);
+
+ QCOMPARE(image.constBits(), (const uchar *)data);
+ image.setDotsPerMeterX(100);
+ QCOMPARE(image.constBits(), (const uchar *)data);
+
+ QImage image2 = image;
+ QCOMPARE(image2.constBits(), (const uchar *)data);
+ image2.setDotsPerMeterX(200);
+ // Pixels and metadata has the same sharing mechanism, so a change of a shared
+ // image metadata forces pixel detach (remove this sub-test if that ever changes).
+ QVERIFY(image2.constBits() != (const uchar *)data);
+ QCOMPARE(image.constBits(), (const uchar *)data);
+}
+
#if defined(Q_OS_WIN)
static inline QColor COLORREFToQColor(COLORREF cr)
diff --git a/tests/auto/gui/image/qimageiohandler/CMakeLists.txt b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
index 4bbf2f5b01..b18ff0ca1c 100644
--- a/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
+++ b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qimageiohandler.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qimageiohandler
SOURCES
tst_qimageiohandler.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/image/qimagereader/CMakeLists.txt b/tests/auto/gui/image/qimagereader/CMakeLists.txt
index 3a2dceeebe..77f6bf0f52 100644
--- a/tests/auto/gui/image/qimagereader/CMakeLists.txt
+++ b/tests/auto/gui/image/qimagereader/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qimagereader.pro.
#####################################################################
@@ -17,7 +20,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qimagereader
SOURCES
tst_qimagereader.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/image/qimagewriter/CMakeLists.txt b/tests/auto/gui/image/qimagewriter/CMakeLists.txt
index 7587645585..d51e3c7c65 100644
--- a/tests/auto/gui/image/qimagewriter/CMakeLists.txt
+++ b/tests/auto/gui/image/qimagewriter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qimagewriter.pro.
#####################################################################
@@ -13,7 +16,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qimagewriter
SOURCES
tst_qimagewriter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${test_data}
)
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index 88fa0634fb..f64c94bb90 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -102,7 +102,7 @@ void tst_QImageWriter::getSetCheck()
QCOMPARE((QIODevice *) var1, obj1.device());
// The class should possibly handle a 0-pointer as a device, since
- // there is a default contructor, so it's "handling" a 0 device by default.
+ // there is a default constructor, so it's "handling" a 0 device by default.
// For example: QMovie::setDevice(0) works just fine
obj1.setDevice((QIODevice *)0);
QCOMPARE((QIODevice *) 0, obj1.device());
diff --git a/tests/auto/gui/image/qmovie/CMakeLists.txt b/tests/auto/gui/image/qmovie/CMakeLists.txt
index 545ee481d1..9683c0d98d 100644
--- a/tests/auto/gui/image/qmovie/CMakeLists.txt
+++ b/tests/auto/gui/image/qmovie/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmovie.pro.
#####################################################################
@@ -13,7 +16,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qmovie
SOURCES
tst_qmovie.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${test_data}
)
@@ -41,7 +44,7 @@ qt_internal_add_resource(tst_qmovie "resources"
#####################################################################
qt_internal_extend_target(tst_qmovie CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/image/qpicture/CMakeLists.txt b/tests/auto/gui/image/qpicture/CMakeLists.txt
index 29bf68fa06..72f71470ae 100644
--- a/tests/auto/gui/image/qpicture/CMakeLists.txt
+++ b/tests/auto/gui/image/qpicture/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpicture.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpicture
SOURCES
tst_qpicture.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/image/qpixmap/CMakeLists.txt b/tests/auto/gui/image/qpixmap/CMakeLists.txt
index 1946715047..fe1ee5f359 100644
--- a/tests/auto/gui/image/qpixmap/CMakeLists.txt
+++ b/tests/auto/gui/image/qpixmap/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpixmap.pro.
#####################################################################
@@ -25,7 +28,7 @@ list(APPEND test_data ${test_data_glob})
qt_internal_add_test(tst_qpixmap
SOURCES
tst_qpixmap.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -95,13 +98,13 @@ qt_internal_add_resource(tst_qpixmap "qpixmap"
#####################################################################
qt_internal_extend_target(tst_qpixmap CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
Qt::WidgetsPrivate
)
qt_internal_extend_target(tst_qpixmap CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
gdi32
user32
)
diff --git a/tests/auto/gui/image/qpixmapcache/CMakeLists.txt b/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
index 9e99842e6e..3e087220e5 100644
--- a/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
+++ b/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpixmapcache.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qpixmapcache
SOURCES
tst_qpixmapcache.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/itemmodels/CMakeLists.txt b/tests/auto/gui/itemmodels/CMakeLists.txt
index 69b6cb0e22..1968a04326 100644
--- a/tests/auto/gui/itemmodels/CMakeLists.txt
+++ b/tests/auto/gui/itemmodels/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from itemmodels.pro.
add_subdirectory(qstandarditem)
diff --git a/tests/auto/gui/itemmodels/qfilesystemmodel/CMakeLists.txt b/tests/auto/gui/itemmodels/qfilesystemmodel/CMakeLists.txt
index 31fd8ca32d..a9c658c350 100644
--- a/tests/auto/gui/itemmodels/qfilesystemmodel/CMakeLists.txt
+++ b/tests/auto/gui/itemmodels/qfilesystemmodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfilesystemmodel.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qfilesystemmodel
SOURCES
tst_qfilesystemmodel.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::Widgets
diff --git a/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
index e5446d596a..88fe684a9c 100644
--- a/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
+++ b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstandarditem.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qstandarditem
SOURCES
tst_qstandarditem.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt b/tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt
index 49cbcbfa88..e0c64964dc 100644
--- a/tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt
+++ b/tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstandarditemmodel.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qstandarditemmodel
SOURCES
tst_qstandarditemmodel.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/CMakeLists.txt b/tests/auto/gui/kernel/CMakeLists.txt
index 1e72872516..84d2508826 100644
--- a/tests/auto/gui/kernel/CMakeLists.txt
+++ b/tests/auto/gui/kernel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from kernel.pro.
if(QT_FEATURE_action)
diff --git a/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
index 9e47156add..415259b08f 100644
--- a/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
+++ b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from noqteventloop.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_noqteventloop
SOURCES
tst_noqteventloop.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -18,6 +21,6 @@ qt_internal_add_test(tst_noqteventloop
#####################################################################
qt_internal_extend_target(tst_noqteventloop CONDITION QT_FEATURE_dynamicgl AND WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
user32
)
diff --git a/tests/auto/gui/kernel/qaction/CMakeLists.txt b/tests/auto/gui/kernel/qaction/CMakeLists.txt
index ed0a0a8a5b..8545480df8 100644
--- a/tests/auto/gui/kernel/qaction/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qaction/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qaction.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qaction_kernel
SOURCES
tst_qaction.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt b/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt
index 10354f865c..33b954e6ab 100644
--- a/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qactiongroup/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qactiongroup.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qactiongroup_kernel
SOURCES
tst_qactiongroup.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt b/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt
index 454196ce1b..570ced507a 100644
--- a/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qaddpostroutine.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qaddpostroutine
SOURCES
tst_qaddpostroutine.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt b/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
index 64ef31a0b5..64be807262 100644
--- a/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbackingstore.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qbackingstore
SOURCES
tst_qbackingstore.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
index 0406fe0f07..d9528fc8e4 100644
--- a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
+++ b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
@@ -239,7 +239,7 @@ public:
backingStore.resize(size());
}
- void exposeEvent(QExposeEvent *event) override
+ void paintEvent(QPaintEvent *event) override
{
QRect rect(QPoint(), size());
@@ -251,10 +251,7 @@ public:
backingStore.endPaint();
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
backingStore.flush(event->region().boundingRect());
-QT_WARNING_POP
}
private:
diff --git a/tests/auto/gui/kernel/qclipboard/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
index 05eba972d6..8507d92c99 100644
--- a/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qclipboard.pro.
add_subdirectory(copier)
diff --git a/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
index ef599b121e..a8dea1d2f1 100644
--- a/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from copier.pro.
#####################################################################
@@ -12,7 +15,7 @@ qt_internal_add_executable(copier
${args} # special case
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
index 571ae4944e..706fb17a6b 100644
--- a/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from paster.pro.
#####################################################################
@@ -12,7 +15,7 @@ qt_internal_add_executable(paster
${args} # special case
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
index 0e9fa8f40d..a98715a778 100644
--- a/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from test.pro.
#####################################################################
@@ -8,7 +11,7 @@ qt_internal_add_test(tst_qclipboard
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
SOURCES
../tst_qclipboard.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
@@ -17,7 +20,7 @@ qt_internal_add_test(tst_qclipboard
#####################################################################
qt_internal_extend_target(tst_qclipboard CONDITION MACOS
- PUBLIC_LIBRARIES
+ LIBRARIES
${FWAppKit}
)
diff --git a/tests/auto/gui/kernel/qcursor/CMakeLists.txt b/tests/auto/gui/kernel/qcursor/CMakeLists.txt
index 1304dd2ba2..6e5b02865e 100644
--- a/tests/auto/gui/kernel/qcursor/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qcursor/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcursor.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qcursor
SOURCES
tst_qcursor.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qdrag/CMakeLists.txt b/tests/auto/gui/kernel/qdrag/CMakeLists.txt
index b03f82da39..8b97a8c14d 100644
--- a/tests/auto/gui/kernel/qdrag/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qdrag/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdrag.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qdrag
SOURCES
tst_qdrag.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qevent/CMakeLists.txt b/tests/auto/gui/kernel/qevent/CMakeLists.txt
index 7b37b0c51a..28d43ae99e 100644
--- a/tests/auto/gui/kernel/qevent/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qevent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qevent.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qevent
SOURCES
tst_qevent.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::CorePrivate
)
diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
index 0ad8a60bea..5420a5bd5f 100644
--- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp
+++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
@@ -8,12 +8,6 @@
#include <QtGui/qevent.h>
#include <QtCore/private/qfutureinterface_p.h>
-#ifdef QT_BUILD_INTERNAL
-# define ONLY_IF_INTERNAL_BUILD(...) __VA_ARGS__
-#else
-# define ONLY_IF_INTERNAL_BUILD(...)
-#endif
-
#define FOR_EACH_CORE_EVENT(X) \
/* qcoreevent.h */ \
X(QEvent, (QEvent::None)) \
@@ -22,7 +16,7 @@
X(QDynamicPropertyChangeEvent, ("size")) \
X(QDeferredDeleteEvent, ()) \
/* qfutureinterface_p.h */ \
- ONLY_IF_INTERNAL_BUILD(X(QFutureCallOutEvent, ())) \
+ X(QFutureCallOutEvent, ()) \
/* end */
#define FOR_EACH_GUI_EVENT(X) \
diff --git a/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
index 2404833737..2487f1bc5b 100644
--- a/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfileopenevent.pro.
add_subdirectory(test)
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
index 658a70619f..511016a2e7 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfileopeneventexternal.pro.
#####################################################################
@@ -8,7 +11,7 @@ qt_internal_add_executable(qfileopeneventexternal
GUI
SOURCES
qfileopeneventexternal.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
index faa5e5acfc..bbc872c986 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from test.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qfileopenevent
SOURCES
tst_qfileopenevent.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qguiapplication/BLACKLIST b/tests/auto/gui/kernel/qguiapplication/BLACKLIST
index 2f1e5f333e..3fa6c4880b 100644
--- a/tests/auto/gui/kernel/qguiapplication/BLACKLIST
+++ b/tests/auto/gui/kernel/qguiapplication/BLACKLIST
@@ -1,6 +1,2 @@
-[focusObject]
-ubuntu-16.04
-opensuse-42.3
-
[quitOnLastWindowClosedWithEventLoopLocker]
b2qt
diff --git a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
index 12989dd375..ee763da977 100644
--- a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qguiapplication.pro.
#####################################################################
@@ -28,7 +31,7 @@ qt_internal_add_test(tst_qguiapplication
QT_QGUIAPPLICATIONTEST=1
INCLUDE_DIRECTORIES
../../../corelib/kernel/qcoreapplication
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
TESTDATA ${tst_qguiapplication_resource_files}
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index 500f13ea38..e8c283252e 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -520,26 +520,35 @@ void tst_QGuiApplication::palette()
// The default application palette is not resolved
QVERIFY(!QGuiApplication::palette().resolveMask());
+ // TODO: add event processing instead of the signal
+#if QT_DEPRECATED_SINCE(6, 0)
QSignalSpy signalSpy(&app, SIGNAL(paletteChanged(QPalette)));
+#endif
QPalette oldPalette = QGuiApplication::palette();
QPalette newPalette = QPalette(Qt::red);
QGuiApplication::setPalette(newPalette);
QVERIFY(palettesMatch(QGuiApplication::palette(), newPalette));
+#if QT_DEPRECATED_SINCE(6, 0)
QCOMPARE(signalSpy.count(), 1);
+#endif
QVERIFY(palettesMatch(signalSpy.at(0).at(0).value<QPalette>(), newPalette));
QCOMPARE(QGuiApplication::palette(), QPalette());
QGuiApplication::setPalette(oldPalette);
QVERIFY(palettesMatch(QGuiApplication::palette(), oldPalette));
+#if QT_DEPRECATED_SINCE(6, 0)
QCOMPARE(signalSpy.count(), 2);
+#endif
QVERIFY(palettesMatch(signalSpy.at(1).at(0).value<QPalette>(), oldPalette));
QCOMPARE(QGuiApplication::palette(), QPalette());
QGuiApplication::setPalette(oldPalette);
QVERIFY(palettesMatch(QGuiApplication::palette(), oldPalette));
+#if QT_DEPRECATED_SINCE(6, 0)
QCOMPARE(signalSpy.count(), 2);
+#endif
QCOMPARE(QGuiApplication::palette(), QPalette());
}
diff --git a/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt b/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
index b1c0508198..2a6d6732b6 100644
--- a/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qguieventdispatcher.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qguieventdispatcher
SOURCES
../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
index ec9441a1dc..28307d867f 100644
--- a/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qguieventloop.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qguieventloop
SOURCES
../../../corelib/kernel/qeventloop/tst_qeventloop.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::Network
@@ -17,7 +20,7 @@ qt_internal_add_test(tst_qguieventloop
#####################################################################
qt_internal_extend_target(tst_qguieventloop CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
user32
)
diff --git a/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt b/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
index 0887f05fc6..0a82f21d77 100644
--- a/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qguimetatype.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qguimetatype
SOURCES
tst_qguimetatype.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index ff464e29c9..686e2a0e8b 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -20,6 +20,8 @@ private slots:
void sizeOf();
void flags_data();
void flags();
+ void flags2_data();
+ void flags2();
void construct_data();
void construct();
void constructCopy_data();
@@ -293,14 +295,27 @@ struct TypeAlignment
enum { Value = alignof(T) };
};
+template <typename T> void addFlagsRow(const char *name, int id = qMetaTypeId<T>())
+{
+ QTest::newRow(name)
+ << id
+ << bool(QTypeInfo<T>::isRelocatable)
+ << bool(!std::is_trivially_default_constructible_v<T>)
+ << bool(!std::is_trivially_copy_constructible_v<T>)
+ << bool(!std::is_trivially_destructible_v<T>);
+}
+
+// tst_QGuiMetaType::flags is nearly identical to tst_QMetaType::flags
void tst_QGuiMetaType::flags_data()
{
QTest::addColumn<int>("type");
QTest::addColumn<bool>("isRelocatable");
- QTest::addColumn<bool>("isComplex");
+ QTest::addColumn<bool>("needsConstruction");
+ QTest::addColumn<bool>("needsCopyConstruction");
+ QTest::addColumn<bool>("needsDestruction");
#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
- QTest::newRow(#RealType) << MetaTypeId << bool(QTypeInfo<RealType>::isRelocatable) << bool(QTypeInfo<RealType>::isComplex);
+ addFlagsRow<RealType>(#RealType, MetaTypeId);
QT_FOR_EACH_STATIC_GUI_CLASS(ADD_METATYPE_TEST_ROW)
#undef ADD_METATYPE_TEST_ROW
}
@@ -309,13 +324,62 @@ void tst_QGuiMetaType::flags()
{
QFETCH(int, type);
QFETCH(bool, isRelocatable);
- QFETCH(bool, isComplex);
+ QFETCH(bool, needsConstruction);
+ QFETCH(bool, needsCopyConstruction);
+ QFETCH(bool, needsDestruction);
- QCOMPARE(bool(QMetaType(type).flags() & QMetaType::NeedsConstruction), isComplex);
- QCOMPARE(bool(QMetaType(type).flags() & QMetaType::NeedsDestruction), isComplex);
+ QCOMPARE(bool(QMetaType(type).flags() & QMetaType::NeedsConstruction), needsConstruction);
+ QCOMPARE(bool(QMetaType(type).flags() & QMetaType::NeedsCopyConstruction), needsCopyConstruction);
+ QCOMPARE(bool(QMetaType(type).flags() & QMetaType::NeedsDestruction), needsDestruction);
QCOMPARE(bool(QMetaType(type).flags() & QMetaType::RelocatableType), isRelocatable);
}
+template <typename T> static void addFlags2Row(QMetaType metaType = QMetaType::fromType<T>())
+{
+ QTest::newRow(metaType.name() ? metaType.name() : "UnknownType")
+ << metaType
+ << std::is_default_constructible_v<T>
+ << std::is_copy_constructible_v<T>
+ << std::is_move_constructible_v<T>
+ << std::is_destructible_v<T>
+ << (QTypeTraits::has_operator_equal<T>::value || QTypeTraits::has_operator_less_than<T>::value)
+ << QTypeTraits::has_operator_less_than<T>::value;
+};
+
+// tst_QGuiMetaType::flags2 is nearly identical to tst_QMetaType::flags2
+void tst_QGuiMetaType::flags2_data()
+{
+ QTest::addColumn<QMetaType>("type");
+ QTest::addColumn<bool>("isDefaultConstructible");
+ QTest::addColumn<bool>("isCopyConstructible");
+ QTest::addColumn<bool>("isMoveConstructible");
+ QTest::addColumn<bool>("isDestructible");
+ QTest::addColumn<bool>("isEqualityComparable");
+ QTest::addColumn<bool>("isOrdered");
+
+#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
+ addFlags2Row<RealType>();
+QT_FOR_EACH_STATIC_GUI_CLASS(ADD_METATYPE_TEST_ROW)
+#undef ADD_METATYPE_TEST_ROW
+}
+
+void tst_QGuiMetaType::flags2()
+{
+ QFETCH(QMetaType, type);
+ QFETCH(bool, isDefaultConstructible);
+ QFETCH(bool, isCopyConstructible);
+ QFETCH(bool, isMoveConstructible);
+ QFETCH(bool, isDestructible);
+ QFETCH(bool, isEqualityComparable);
+ QFETCH(bool, isOrdered);
+
+ QCOMPARE(type.isDefaultConstructible(), isDefaultConstructible);
+ QCOMPARE(type.isCopyConstructible(), isCopyConstructible);
+ QCOMPARE(type.isMoveConstructible(), isMoveConstructible);
+ QCOMPARE(type.isDestructible(), isDestructible);
+ QCOMPARE(type.isEqualityComparable(), isEqualityComparable);
+ QCOMPARE(type.isOrdered(), isOrdered);
+}
void tst_QGuiMetaType::construct_data()
{
diff --git a/tests/auto/gui/kernel/qguitimer/CMakeLists.txt b/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
index 5375155a82..edd2c644a5 100644
--- a/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qguitimer.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qguitimer
SOURCES
../../../corelib/kernel/qtimer/tst_qtimer.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qguivariant/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
index 3a0adab6e3..dacbc46ca1 100644
--- a/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qguivariant.pro.
add_subdirectory(test)
diff --git a/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
index 2e6f548f11..ca63768984 100644
--- a/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
@@ -1,12 +1,15 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from no_application.pro.
#####################################################################
## no_application Test:
#####################################################################
-qt_internal_add_test(no_application
+qt_internal_add_test(tst_gui_variant_no_application
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
index 49e985fa82..9ac3571604 100644
--- a/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from test.pro.
#####################################################################
@@ -15,7 +18,7 @@ qt_internal_add_test(tst_qguivariant
tst_qguivariant.cpp
INCLUDE_DIRECTORIES
../../../../other/qvariant_common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${qguivariant_resource_files}
BUILTIN_TESTDATA
diff --git a/tests/auto/gui/kernel/qhighdpi/CMakeLists.txt b/tests/auto/gui/kernel/qhighdpi/CMakeLists.txt
index bdd9a5e17f..2e4fb9fc01 100644
--- a/tests/auto/gui/kernel/qhighdpi/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qhighdpi/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qhighdpi.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qhighdpi
SOURCES
tst_qhighdpi.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp b/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp
index 5f0d226124..2196724f41 100644
--- a/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp
+++ b/tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp
@@ -39,6 +39,8 @@ private slots:
void environment_QT_SCREEN_SCALE_FACTORS_data();
void environment_QT_SCREEN_SCALE_FACTORS();
void environment_QT_USE_PHYSICAL_DPI();
+ void environment_QT_SCALE_FACTOR_ROUNDING_POLICY();
+ void application_setScaleFactorRoundingPolicy();
void screenAt_data();
void screenAt();
void screenGeometry_data();
@@ -187,6 +189,7 @@ void tst_QHighDpi::cleanup()
qunsetenv("QT_SCALE_FACTOR");
qunsetenv("QT_SCREEN_SCALE_FACTORS");
qunsetenv("QT_USE_PHYSICAL_DPI");
+ qunsetenv("QT_SCALE_FACTOR_ROUNDING_POLICY");
}
void tst_QHighDpi::qhighdpiscaling_data()
@@ -267,7 +270,7 @@ void tst_QHighDpi::screenDpiChange()
void tst_QHighDpi::environment_QT_SCALE_FACTOR()
{
qreal factor = 3.1415;
- qputenv("QT_SCALE_FACTOR", QByteArray::number(factor));
+ qputenv("QT_SCALE_FACTOR", std::to_string(factor));
QList<qreal> dpiValues { 96, 144, 192 };
std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
@@ -351,6 +354,59 @@ void tst_QHighDpi::environment_QT_USE_PHYSICAL_DPI()
}
}
+void tst_QHighDpi::environment_QT_SCALE_FACTOR_ROUNDING_POLICY()
+{
+ QList<qreal> dpiValues { 96, 144, 192 };
+
+ qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY", "PassThrough");
+ {
+ std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
+ for (int i = 0; i < dpiValues.count(); ++i)
+ QCOMPARE(app->screens()[i]->devicePixelRatio(), dpiValues[i] / qreal(96));
+ }
+
+ qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY", "Round");
+ {
+ std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
+ for (int i = 0; i < dpiValues.count(); ++i)
+ QCOMPARE(app->screens()[i]->devicePixelRatio(), qRound(dpiValues[i] / qreal(96)));
+ }
+
+ qunsetenv("QT_SCALE_FACTOR_ROUNDING_POLICY");
+ {
+ std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
+ for (int i = 0; i < dpiValues.count(); ++i)
+ QCOMPARE(app->screens()[i]->devicePixelRatio(), dpiValues[i] / qreal(96));
+ }
+}
+
+void tst_QHighDpi::application_setScaleFactorRoundingPolicy()
+{
+ QList<qreal> dpiValues { 96, 144, 192 };
+ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round);
+ {
+ std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
+ for (int i = 0; i < dpiValues.count(); ++i)
+ QCOMPARE(app->screens()[i]->devicePixelRatio(), qRound(dpiValues[i] / qreal(96)));
+ }
+
+ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
+ {
+ std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
+ for (int i = 0; i < dpiValues.count(); ++i)
+ QCOMPARE(app->screens()[i]->devicePixelRatio(), dpiValues[i] / qreal(96));
+ }
+
+ // Verify that environment overrides app setting
+ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round);
+ qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY", "PassThrough");
+ {
+ std::unique_ptr<QGuiApplication> app(createStandardOffscreenApp(dpiValues));
+ for (int i = 0; i < dpiValues.count(); ++i)
+ QCOMPARE(app->screens()[i]->devicePixelRatio(), dpiValues[i] / qreal(96));
+ }
+}
+
void tst_QHighDpi::minimumDpr()
{
QList<qreal> dpiValues { 40, 60, 95 };
diff --git a/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt b/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt
index aea72357dd..4080023afc 100644
--- a/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qinputdevice.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qinputdevice
SOURCES
tst_qinputdevice.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt b/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
index bbe8652e99..871569e681 100644
--- a/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qinputmethod.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qinputmethod
SOURCES
tst_qinputmethod.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt b/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
index bd9f602e56..8d479e5e7c 100644
--- a/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qkeyevent.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qkeyevent
SOURCES
tst_qkeyevent.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt b/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
index ea71ce3870..61752e23e2 100644
--- a/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qkeysequence.pro.
#####################################################################
@@ -13,7 +16,7 @@ set(qkeysequence_resource_files
qt_internal_add_test(tst_qkeysequence
SOURCES
tst_qkeysequence.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
index baf9b83b55..f9e989eed2 100644
--- a/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmouseevent.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qmouseevent
SOURCES
tst_qmouseevent.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
index 698327736e..bf7b8d8965 100644
--- a/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmouseevent_modal.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qmouseevent_modal
SOURCES
tst_qmouseevent_modal.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Widgets
)
diff --git a/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt b/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
index d171716776..cf5e0ecca6 100644
--- a/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qopenglwindow.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qopenglwindow
SOURCES
tst_qopenglwindow.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qpalette/CMakeLists.txt b/tests/auto/gui/kernel/qpalette/CMakeLists.txt
index f69ac75a41..19cd080722 100644
--- a/tests/auto/gui/kernel/qpalette/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qpalette/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpalette.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpalette
SOURCES
tst_qpalette.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index 22aaaecf19..150d58e6f4 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -102,9 +102,16 @@ void tst_QPalette::resolve()
// ensure the resolve mask is full
for (int r = 0; r < QPalette::NColorRoles; ++r)
p3.setBrush(QPalette::All, QPalette::ColorRole(r), Qt::red);
+ const QPalette::ResolveMask fullMask = p3.resolveMask();
QPalette p3ResolvedToP1 = p3.resolve(p1);
QVERIFY(p3ResolvedToP1.isCopyOf(p3));
+
+ QPalette p4;
+ QCOMPARE(p4.resolveMask(), QPalette::ResolveMask{});
+ // resolve must detach even if p4 has no mask
+ p4 = p4.resolve(p3);
+ QCOMPARE(p3.resolveMask(), fullMask);
}
@@ -190,9 +197,6 @@ void tst_QPalette::setBrush()
const QPalette pp = p;
QVERIFY(pp.isCopyOf(p));
- // Setting the same brush won't detach
- p.setBrush(QPalette::Disabled, QPalette::Button, Qt::green);
- QVERIFY(pp.isCopyOf(p));
}
void tst_QPalette::isBrushSet()
@@ -217,7 +221,7 @@ void tst_QPalette::isBrushSet()
QVERIFY(!p2.isBrushSet(QPalette::Active, QPalette::Dark));
p2.setBrush(QPalette::Active, QPalette::Dark, p2.brush(QPalette::Active, QPalette::Dark));
QVERIFY(!p3.isBrushSet(QPalette::Active, QPalette::Dark));
- QVERIFY(!p2.isBrushSet(QPalette::Active, QPalette::Dark));
+ QVERIFY(p2.isBrushSet(QPalette::Active, QPalette::Dark));
}
void tst_QPalette::setAllPossibleBrushes()
diff --git a/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt b/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
index e33600dd8c..393f80eda2 100644
--- a/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpixelformat.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpixelformat
SOURCES
tst_qpixelformat.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt b/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
index 82391cf18f..39ff2cfee5 100644
--- a/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qrasterwindow.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qrasterwindow
SOURCES
tst_qrasterwindow.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qscreen/CMakeLists.txt b/tests/auto/gui/kernel/qscreen/CMakeLists.txt
index 9bed97cfcb..25d5c018c7 100644
--- a/tests/auto/gui/kernel/qscreen/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qscreen/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qscreen.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qscreen
SOURCES
tst_qscreen.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qshortcut/CMakeLists.txt b/tests/auto/gui/kernel/qshortcut/CMakeLists.txt
index 469ab47769..f593cb526f 100644
--- a/tests/auto/gui/kernel/qshortcut/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qshortcut/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qshortcut.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qshortcut_kernel
SOURCES
tst_qshortcut.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt b/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
index f1fab57ebe..ffcd9e50e0 100644
--- a/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsurfaceformat.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qsurfaceformat
SOURCES
tst_qsurfaceformat.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt b/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
index e9a6271f58..3576aed84f 100644
--- a/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtouchevent.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtouchevent
SOURCES
tst_qtouchevent.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
Qt::Widgets
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index 0a80b127e8..1df80a5683 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -1145,7 +1145,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
rightWidget.setGeometry(300, 100, 100, 100);
touchWidget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&touchWidget));
+ QVERIFY(QTest::qWaitForWindowActive(&touchWidget));
const QPointF leftPos = leftWidget.rect().center();
const QPointF rightPos = rightWidget.rect().center();
@@ -1185,6 +1185,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QVERIFY(!rightWidget.seenTouchEnd);
QCOMPARE(leftWidget.touchBeginPoints.count(), 2);
QCOMPARE(rightWidget.touchBeginPoints.count(), 0);
+ QCOMPARE(leftWidget.lastNormalizedPositions.count(), 2);
{
QEventPoint leftTouchPoint = leftWidget.touchBeginPoints.at(0);
qCDebug(lcTests) << "lastNormalizedPositions after press" << leftWidget.lastNormalizedPositions;
@@ -1200,7 +1201,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QCOMPARE(leftTouchPoint.globalPosition(), leftScreenPos);
QCOMPARE(leftTouchPoint.globalPressPosition(), leftScreenPos);
QCOMPARE(leftTouchPoint.globalLastPosition(), leftScreenPos);
- QVERIFY(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.2) < 0.05); // 0.198, might depend on window frame size
+ QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.2), 0.05); // 0.198, might depend on window frame size
QCOMPARE(leftTouchPoint.position(), leftPos);
QCOMPARE(leftTouchPoint.scenePosition(), leftScreenPos);
QCOMPARE(leftTouchPoint.globalPosition(), leftScreenPos);
@@ -1220,7 +1221,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QCOMPARE(rightTouchPoint.globalPosition(), rightScreenPos);
QCOMPARE(rightTouchPoint.globalPressPosition(), rightScreenPos);
QCOMPARE(rightTouchPoint.globalLastPosition(), rightScreenPos);
- QVERIFY(qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.8) < 0.05); // 0.798, might depend on window frame size
+ QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.8), 0.05); // 0.798, might depend on window frame size
QCOMPARE(rightTouchPoint.scenePosition(), rightScreenPos);
QCOMPARE(rightTouchPoint.globalPosition(), rightScreenPos);
QCOMPARE(rightTouchPoint.ellipseDiameters(), QSizeF(0, 0));
@@ -1247,6 +1248,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QVERIFY(!rightWidget.seenTouchEnd);
QCOMPARE(leftWidget.touchUpdatePoints.count(), 2);
QCOMPARE(rightWidget.touchUpdatePoints.count(), 0);
+ QCOMPARE(leftWidget.lastNormalizedPositions.count(), 2);
{
QEventPoint leftTouchPoint = leftWidget.touchUpdatePoints.at(0);
qCDebug(lcTests) << "lastNormalizedPositions after update" << leftWidget.lastNormalizedPositions;
@@ -1262,7 +1264,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QCOMPARE(leftTouchPoint.globalPosition(), centerScreenPos);
QCOMPARE(leftTouchPoint.globalPressPosition(), leftScreenPos);
QCOMPARE(leftTouchPoint.globalLastPosition(), leftScreenPos);
- QVERIFY(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.5) < 0.05); // 0.498, might depend on window frame size
+ QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.5), 0.05); // 0.498, might depend on window frame size
QCOMPARE(leftTouchPoint.position(), leftWidget.mapFromParent(centerPos.toPoint()));
QCOMPARE(leftTouchPoint.scenePosition(), centerScreenPos);
QCOMPARE(leftTouchPoint.globalPosition(), centerScreenPos);
@@ -1282,7 +1284,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QCOMPARE(rightTouchPoint.globalPosition(), centerScreenPos);
QCOMPARE(rightTouchPoint.globalPressPosition(), rightScreenPos);
QCOMPARE(rightTouchPoint.globalLastPosition(), rightScreenPos);
- QVERIFY(qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.5) < 0.05); // 0.498, might depend on window frame size
+ QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.5), 0.05); // 0.498, might depend on window frame size
QCOMPARE(rightTouchPoint.position(), leftWidget.mapFromParent(centerPos.toPoint()));
QCOMPARE(rightTouchPoint.scenePosition(), centerScreenPos);
QCOMPARE(rightTouchPoint.globalPosition(), centerScreenPos);
@@ -1309,6 +1311,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QVERIFY(!rightWidget.seenTouchEnd);
QCOMPARE(leftWidget.touchEndPoints.count(), 2);
QCOMPARE(rightWidget.touchEndPoints.count(), 0);
+ QCOMPARE(leftWidget.lastNormalizedPositions.count(), 2);
{
QEventPoint leftTouchPoint = leftWidget.touchEndPoints.at(0);
qCDebug(lcTests) << "lastNormalizedPositions after release" << leftWidget.lastNormalizedPositions;
@@ -1325,7 +1328,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QCOMPARE(leftTouchPoint.globalPosition(), centerScreenPos);
QCOMPARE(leftTouchPoint.globalPressPosition(), leftScreenPos);
QCOMPARE(leftTouchPoint.globalLastPosition(), leftScreenPos);
- QVERIFY(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.5) < 0.05); // 0.498, might depend on window frame size
+ QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.5), 0.05); // 0.498, might depend on window frame size
QCOMPARE(leftTouchPoint.position(), leftWidget.mapFromParent(centerPos.toPoint()));
QCOMPARE(leftTouchPoint.scenePosition(), centerScreenPos);
QCOMPARE(leftTouchPoint.globalPosition(), centerScreenPos);
@@ -1345,7 +1348,7 @@ void tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad()
QCOMPARE(rightTouchPoint.globalPosition(), centerScreenPos);
QCOMPARE(rightTouchPoint.globalPressPosition(), rightScreenPos);
QCOMPARE(rightTouchPoint.globalLastPosition(), rightScreenPos);
- QVERIFY(qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.5) < 0.05); // 0.498, might depend on window frame size
+ QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.5), 0.05); // 0.498, might depend on window frame size
QCOMPARE(rightTouchPoint.position(), leftWidget.mapFromParent(centerPos.toPoint()));
QCOMPARE(rightTouchPoint.scenePosition(), centerScreenPos);
QCOMPARE(rightTouchPoint.globalPosition(), centerScreenPos);
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index f5786e7522..328d3f51b1 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -1,9 +1,4 @@
[positioning]
-opensuse-leap
-[positioning:default]
-linux
-macos ci
-[positioning:fake]
macos ci
[modalWithChildWindow]
# QTBUG-69160
diff --git a/tests/auto/gui/kernel/qwindow/CMakeLists.txt b/tests/auto/gui/kernel/qwindow/CMakeLists.txt
index 23671cc385..93a04e5317 100644
--- a/tests/auto/gui/kernel/qwindow/CMakeLists.txt
+++ b/tests/auto/gui/kernel/qwindow/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qwindow.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qwindow
SOURCES
tst_qwindow.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -17,6 +20,6 @@ qt_internal_add_test(tst_qwindow
#####################################################################
qt_internal_extend_target(tst_qwindow CONDITION QT_FEATURE_dynamicgl AND WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
user32
)
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index dafa69fb96..f668026991 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -86,6 +86,7 @@ private slots:
void keepPendingUpdateRequests();
void activateDeactivateEvent();
void qobject_castOnDestruction();
+ void touchToMouseTranslationByPopup();
private:
QPoint m_availableTopLeft;
@@ -286,13 +287,6 @@ public:
m_received[event->type()]++;
m_order << event->type();
switch (event->type()) {
- case QEvent::Expose:
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- m_exposeRegion = static_cast<QExposeEvent *>(event)->region();
-QT_WARNING_POP
- break;
-
case QEvent::PlatformSurface:
m_surfaceventType = static_cast<QPlatformSurfaceEvent *>(event)->surfaceEventType();
break;
@@ -322,11 +316,6 @@ QT_WARNING_POP
return m_order.indexOf(type);
}
- QRegion exposeRegion() const
- {
- return m_exposeRegion;
- }
-
QPlatformSurfaceEvent::SurfaceEventType surfaceEventType() const
{
return m_surfaceventType;
@@ -338,7 +327,6 @@ QT_WARNING_POP
private:
QHash<QEvent::Type, int> m_received;
QList<QEvent::Type> m_order;
- QRegion m_exposeRegion;
QPlatformSurfaceEvent::SurfaceEventType m_surfaceventType;
};
@@ -505,6 +493,9 @@ static bool isPlatformWayland()
void tst_QWindow::positioning()
{
+#ifdef Q_OS_ANDROID
+ QSKIP("Fails on Android. QTBUG-105201");
+#endif
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(
QPlatformIntegration::NonFullScreenWindows)) {
QSKIP("This platform does not support non-fullscreen windows");
@@ -526,9 +517,8 @@ void tst_QWindow::positioning()
QCOMPARE(window.geometry(), geometry);
// explicitly use non-fullscreen show. show() can be fullscreen on some platforms
window.showNormal();
- QCoreApplication::processEvents();
- QVERIFY(QTest::qWaitForWindowExposed(&window));
+ QVERIFY(QTest::qWaitForWindowActive(&window));
QMargins originalMargins = window.frameMargins();
@@ -796,16 +786,6 @@ void tst_QWindow::isExposed()
QTRY_VERIFY(window.received(QEvent::Expose) > 0);
QTRY_VERIFY(window.isExposed());
-#ifndef Q_OS_WIN
- // This is a top-level window so assuming it is completely exposed, the
- // expose region must be (0, 0), (width, height). If this is not the case,
- // the platform plugin is sending expose events with a region in an
- // incorrect coordinate system.
- QRect r = window.exposeRegion().boundingRect();
- r = QRect(window.mapToGlobal(r.topLeft()), r.size());
- QCOMPARE(r, window.geometry());
-#endif
-
window.hide();
QCoreApplication::processEvents();
@@ -950,6 +930,9 @@ public:
if (spinLoopWhenPressed)
QCoreApplication::processEvents();
}
+ if (closeOnTap)
+ this->close();
+
}
void mouseReleaseEvent(QMouseEvent *event) override
{
@@ -1017,6 +1000,8 @@ public:
touchPressLocalPos = point.position();
touchPressGlobalPos = point.globalPosition();
}
+ if (closeOnTap)
+ this->close();
break;
case QEventPoint::State::Released:
++touchReleasedCount;
@@ -1073,6 +1058,8 @@ public:
const QPointingDevice *mouseDevice = nullptr;
const QPointingDevice *touchDevice = nullptr;
+
+ bool closeOnTap = false;
};
static void simulateMouseClick(QWindow *target, const QPointF &local, const QPointF &global)
@@ -1157,18 +1144,14 @@ void tst_QWindow::touchToMouseTranslation()
QVERIFY(QTest::qWaitForWindowExposed(&window));
QList<QWindowSystemInterface::TouchPoint> points;
- QWindowSystemInterface::TouchPoint tp1, tp2, tp3;
+ QWindowSystemInterface::TouchPoint tp1, tp2;
const QRectF pressArea(101, 102, 4, 4);
- const QRectF pressArea1(107, 110, 4, 4);
const QRectF moveArea(105, 108, 4, 4);
tp1.id = 1;
tp1.state = QEventPoint::State::Pressed;
tp1.area = QHighDpi::toNativePixels(pressArea, &window);
tp2.id = 2;
tp2.state = QEventPoint::State::Pressed;
- tp3.id = 3;
- tp3.state = QEventPoint::State::Pressed;
- tp3.area = QHighDpi::toNativePixels(pressArea1, &window);
points << tp1 << tp2;
QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
// Now an update but with changed list order. The mouse event should still
@@ -1250,40 +1233,6 @@ void tst_QWindow::touchToMouseTranslation()
QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
QCoreApplication::processEvents();
QTRY_COMPARE(window.mouseReleaseButton, 1);
-
- points.clear();
- points.append(tp1);
- points[0].state = QEventPoint::State::Pressed;
- QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
- QCoreApplication::processEvents();
- points.clear();
- points.append(tp2);
- points[0].state = QEventPoint::State::Pressed;
- QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
- QCoreApplication::processEvents();
- points.clear();
- points.append(tp3);
- points[0].state = QEventPoint::State::Pressed;
- QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
- QCoreApplication::processEvents();
- QTRY_COMPARE(window.mousePressButton, 1);
-
- points.clear();
- points.append(tp2);
- points[0].state = QEventPoint::State::Released;
- QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
- QCoreApplication::processEvents();
- points.clear();
- points.append(tp3);
- points[0].state = QEventPoint::State::Released;
- QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
- QCoreApplication::processEvents();
- points.clear();
- points.append(tp1);
- points[0].state = QEventPoint::State::Released;
- QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
- QCoreApplication::processEvents();
- QTRY_COMPARE(window.mouseReleaseButton, 1);
}
void tst_QWindow::touchToMouseTranslationForDevices()
@@ -1610,6 +1559,17 @@ void tst_QWindow::sizes()
QCOMPARE(minimumHeightSpy.count(), 1);
QCOMPARE(maximumWidthSpy.count(), 1);
QCOMPARE(maximumHeightSpy.count(), 1);
+
+ // test if min and max limits will change the size
+ QVERIFY(window.minimumWidth() < 50 && window.maximumWidth() > 80);
+ QVERIFY(window.minimumHeight() < 50 && window.maximumHeight() > 80);
+ window.resize(50, 50);
+ QCOMPARE(window.size(), QSize(50, 50));
+ window.setMinimumSize(QSize(60, 60));
+ QCOMPARE(window.size(), QSize(60, 60));
+ window.resize(80, 80);
+ window.setMaximumSize(QSize(70, 70));
+ QCOMPARE(window.size(), QSize(70, 70));
}
class CloseOnCloseEventWindow : public QWindow
@@ -2114,8 +2074,6 @@ void tst_QWindow::initialSize()
w.setTitle(QLatin1String(QTest::currentTestFunction()));
w.setWidth(m_testWindowSize.width());
w.showNormal();
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-66818.", Abort);
QTRY_COMPARE(w.width(), m_testWindowSize.width());
QTRY_VERIFY(w.height() > 0);
}
@@ -2770,6 +2728,36 @@ void tst_QWindow::qobject_castOnDestruction()
});
}
+void tst_QWindow::touchToMouseTranslationByPopup()
+{
+ InputTestWindow window;
+ window.setTitle(QLatin1String(QTest::currentTestFunction()));
+ window.ignoreTouch = true;
+ window.setGeometry(QRect(m_availableTopLeft, m_testWindowSize));
+ window.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
+
+ InputTestWindow popupWindow;
+ popupWindow.setGeometry(QRect(m_availableTopLeft + QPoint(20, 20),
+ QSize(m_testWindowSize.width(), m_testWindowSize.height() / 2)));
+ popupWindow.setFlag(Qt::Popup);
+ popupWindow.setTransientParent(&window);
+ popupWindow.ignoreTouch = true;
+ popupWindow.closeOnTap = true;
+ popupWindow.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&popupWindow));
+
+ QTest::touchEvent(&popupWindow, touchDevice).press(0, {1, 1}, &window);
+ QVERIFY(!popupWindow.isVisible());
+
+ // Omit touchpoint 0: because the popup was closed, touchpoint0.release is not sent.
+ const QPoint tp1(50, 1);
+ QTest::touchEvent(&window, touchDevice).press(1, tp1, &window);
+ QTRY_COMPARE(window.mousePressButton, int(Qt::LeftButton));
+ QTest::touchEvent(&window, touchDevice).release(1, tp1, &window);
+ QTRY_COMPARE(window.mouseReleaseButton, int(Qt::LeftButton));
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow)
diff --git a/tests/auto/gui/math3d/CMakeLists.txt b/tests/auto/gui/math3d/CMakeLists.txt
index 11c50163ad..eb6e87d4a4 100644
--- a/tests/auto/gui/math3d/CMakeLists.txt
+++ b/tests/auto/gui/math3d/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from math3d.pro.
add_subdirectory(qquaternion)
diff --git a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
index 5c54bd6b95..7e3b0fd93f 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
+++ b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmatrixnxn.pro.
#####################################################################
@@ -9,6 +12,6 @@ qt_internal_add_test(tst_qmatrixnxn
tst_qmatrixnxn.cpp
DEFINES
QT_DISABLE_DEPRECATED_BEFORE=0
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/math3d/qquaternion/CMakeLists.txt b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
index fbeb76abdd..52912278a2 100644
--- a/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
+++ b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qquaternion.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qquaternion
SOURCES
tst_qquaternion.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/math3d/qvectornd/CMakeLists.txt b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
index c29550463a..dd12355d3c 100644
--- a/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
+++ b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qvectornd.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qvectornd
SOURCES
tst_qvectornd.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/painting/CMakeLists.txt b/tests/auto/gui/painting/CMakeLists.txt
index 9aa99ea878..f0ac7ea1ee 100644
--- a/tests/auto/gui/painting/CMakeLists.txt
+++ b/tests/auto/gui/painting/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from painting.pro.
add_subdirectory(qpainterpath)
diff --git a/tests/auto/gui/painting/qbrush/CMakeLists.txt b/tests/auto/gui/painting/qbrush/CMakeLists.txt
index c8dad25d94..b058e9f185 100644
--- a/tests/auto/gui/painting/qbrush/CMakeLists.txt
+++ b/tests/auto/gui/painting/qbrush/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbrush.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qbrush
SOURCES
tst_qbrush.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/painting/qcolor/CMakeLists.txt b/tests/auto/gui/painting/qcolor/CMakeLists.txt
index 87753803fb..5d55acfc5b 100644
--- a/tests/auto/gui/painting/qcolor/CMakeLists.txt
+++ b/tests/auto/gui/painting/qcolor/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcolor.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qcolor
SOURCES
tst_qcolor.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/painting/qcolorspace/CMakeLists.txt b/tests/auto/gui/painting/qcolorspace/CMakeLists.txt
index ef53c50551..db66cb7504 100644
--- a/tests/auto/gui/painting/qcolorspace/CMakeLists.txt
+++ b/tests/auto/gui/painting/qcolorspace/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcolorspace.pro.
#####################################################################
@@ -17,7 +20,7 @@ endforeach()
qt_internal_add_test(tst_qcolorspace
SOURCES
tst_qcolorspace.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/painting/qcolortransform/CMakeLists.txt b/tests/auto/gui/painting/qcolortransform/CMakeLists.txt
index 008ac92905..55a84f926c 100644
--- a/tests/auto/gui/painting/qcolortransform/CMakeLists.txt
+++ b/tests/auto/gui/painting/qcolortransform/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qcolortransform Test:
#####################################################################
@@ -5,6 +8,7 @@
qt_internal_add_test(tst_qcolortransform
SOURCES
tst_qcolortransform.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
+ Qt::GuiPrivate
)
diff --git a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp
index c2205a02d1..6fbf7ddf27 100644
--- a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp
+++ b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp
@@ -31,6 +31,8 @@
#include <qcolorspace.h>
#include <qcolortransform.h>
+#include <qrgbafloat.h>
+#include <QtGui/private/qcolortransform_p.h>
class tst_QColorTransform : public QObject
{
@@ -44,8 +46,14 @@ private slots:
void mapRGB32();
void mapRGB64_data();
void mapRGB64();
+ void mapRGBAFP16x4_data();
+ void mapRGBAFP16x4();
+ void mapRGBAFP32x4_data();
+ void mapRGBAFP32x4();
void mapQColor_data();
void mapQColor();
+ void mapRGB32Prepared_data();
+ void mapRGB32Prepared();
void transformIsIdentity();
};
@@ -59,23 +67,22 @@ void tst_QColorTransform::mapRGB32_data()
QTest::addColumn<QColorTransform>("transform");
QTest::addColumn<bool>("sharesRed");
- QTest::newRow("default") << QColorTransform() << true;
- QTest::newRow("sRGB to Linear") << QColorSpace(QColorSpace::SRgb).transformationToColorSpace(QColorSpace::SRgbLinear) << true;
- QTest::newRow("AdobeRGB to sRGB") << QColorSpace(QColorSpace::AdobeRgb).transformationToColorSpace(QColorSpace::SRgb) << true;
- QTest::newRow("Linear AdobeRGB to Linear sRGB")
- << QColorSpace(QColorSpace::AdobeRgb).withTransferFunction(QColorSpace::TransferFunction::Linear).transformationToColorSpace(
- QColorSpace::SRgb)
- << true;
- QTest::newRow("sRgb to AdobeRGB") << QColorSpace(QColorSpace::SRgb).transformationToColorSpace(QColorSpace::AdobeRgb) << true;
- QTest::newRow("DP3 to sRGB") << QColorSpace(QColorSpace::DisplayP3).transformationToColorSpace(QColorSpace::SRgb) << false;
- QTest::newRow("DP3 to Linear DP3")
- << QColorSpace(QColorSpace::DisplayP3).transformationToColorSpace(
- QColorSpace(QColorSpace::DisplayP3).withTransferFunction(QColorSpace::TransferFunction::Linear))
- << false;
- QTest::newRow("Linear DP3 to Linear sRGB")
- << QColorSpace(QColorSpace::DisplayP3).withTransferFunction(QColorSpace::TransferFunction::Linear).transformationToColorSpace(
- QColorSpace::SRgb)
- << false;
+ QColorSpace srgb(QColorSpace::SRgb);
+ QColorSpace srgbLinear(QColorSpace::SRgbLinear);
+ QColorSpace adobeRgb(QColorSpace::AdobeRgb);
+ QColorSpace adobeRgbLinear = adobeRgb.withTransferFunction(QColorSpace::TransferFunction::Linear);
+ QColorSpace dp3(QColorSpace::DisplayP3);
+ QColorSpace dp3Linear = dp3.withTransferFunction(QColorSpace::TransferFunction::Linear);
+
+ QTest::newRow("default") << QColorTransform() << true;
+ QTest::newRow("sRGB to Linear sRGB") << srgb.transformationToColorSpace(srgbLinear) << true;
+ QTest::newRow("AdobeRGB to sRGB") << adobeRgb.transformationToColorSpace(srgb) << true;
+ QTest::newRow("Linear AdobeRGB to AdobeRGB") << adobeRgbLinear.transformationToColorSpace(adobeRgb) << true;
+ QTest::newRow("Linear AdobeRGB to Linear sRGB") << adobeRgbLinear.transformationToColorSpace(srgbLinear) << true;
+ QTest::newRow("sRgb to AdobeRGB") << srgb.transformationToColorSpace(adobeRgb) << true;
+ QTest::newRow("DP3 to sRGB") << dp3.transformationToColorSpace(srgb) << false;
+ QTest::newRow("DP3 to Linear DP3") << dp3.transformationToColorSpace(dp3Linear) << false;
+ QTest::newRow("Linear DP3 to Linear sRGB") << dp3Linear.transformationToColorSpace(srgbLinear) << false;
}
void tst_QColorTransform::mapRGB32()
@@ -180,6 +187,94 @@ void tst_QColorTransform::mapRGB64()
QCOMPARE(result.alpha(), 0xffff);
}
+void tst_QColorTransform::mapRGBAFP16x4_data()
+{
+ mapRGB32_data();
+}
+
+void tst_QColorTransform::mapRGBAFP16x4()
+{
+ QFETCH(QColorTransform, transform);
+ QFETCH(bool, sharesRed);
+
+ QRgbaFloat16 testColor = QRgbaFloat16::fromRgba(128, 64, 32, 255);
+ QRgbaFloat16 result = transform.map(testColor);
+ QVERIFY(result.red() > result.green());
+ QVERIFY(result.green() > result.blue());
+ QCOMPARE(result.alpha(), 1.0f);
+ if (transform.isIdentity())
+ QVERIFY(result == testColor);
+ else
+ QVERIFY(result != testColor);
+
+ testColor = QRgbaFloat16{0.0f, 0.0f, 0.0f, 1.0f};
+ result = transform.map(testColor);
+ QCOMPARE(result, testColor);
+
+ testColor = QRgbaFloat16{1.0f, 1.0f, 1.0f, 1.0f};
+ result = transform.map(testColor);
+ QCOMPARE(result, testColor);
+
+ testColor = QRgbaFloat16{1.0f, 1.0f, 0.0f, 1.0f};
+ result = transform.map(testColor);
+ QCOMPARE(result.alpha(), 1.0f);
+ if (sharesRed)
+ QCOMPARE(result.red(), 1.0f);
+
+ testColor = QRgbaFloat16{0.0f, 1.0f, 1.0f, 1.0f};
+ result = transform.map(testColor);
+ // QRgbaFloat16 might overflow blue if we convert to a smaller gamut:
+ QCOMPARE(result.blue16(), 65535);
+ QCOMPARE(result.alpha(), 1.0f);
+}
+
+void tst_QColorTransform::mapRGBAFP32x4_data()
+{
+ mapRGB32_data();
+}
+
+void tst_QColorTransform::mapRGBAFP32x4()
+{
+ QFETCH(QColorTransform, transform);
+ QFETCH(bool, sharesRed);
+
+ QRgbaFloat32 testColor = QRgbaFloat32::fromRgba(128, 64, 32, 255);
+ QRgbaFloat32 result = transform.map(testColor);
+ QVERIFY(result.red() > result.green());
+ QVERIFY(result.green() > result.blue());
+ QCOMPARE(result.alpha(), 1.0f);
+ if (transform.isIdentity())
+ QVERIFY(result == testColor);
+ else
+ QVERIFY(result != testColor);
+
+ testColor = QRgbaFloat32{0.0f, 0.0f, 0.0f, 1.0f};
+ result = transform.map(testColor);
+ QCOMPARE(result.red(), 0.0f);
+ QCOMPARE(result.green(), 0.0f);
+ QCOMPARE(result.blue(), 0.0f);
+ QCOMPARE(result.alpha(), 1.0f);
+
+ testColor = QRgbaFloat32{1.0f, 1.0f, 1.0f, 1.0f};
+ result = transform.map(testColor);
+ QCOMPARE(result.red(), 1.0f);
+ QCOMPARE(result.green(), 1.0f);
+ QCOMPARE(result.blue(), 1.0f);
+ QCOMPARE(result.alpha(), 1.0f);
+
+ testColor = QRgbaFloat32{1.0f, 1.0f, 0.0f, 1.0f};
+ result = transform.map(testColor);
+ QCOMPARE(result.alpha(), 1.0f);
+ if (sharesRed)
+ QCOMPARE(result.red(), 1.0f);
+
+ testColor = QRgbaFloat32{0.0f, 1.0f, 1.0f, 1.0f};
+ result = transform.map(testColor);
+ // QRgbaFloat16 might overflow blue if we convert to a smaller gamut:
+ QCOMPARE(result.blue16(), 65535);
+ QCOMPARE(result.alpha(), 1.0f);
+}
+
void tst_QColorTransform::mapQColor_data()
{
mapRGB32_data();
@@ -220,6 +315,76 @@ void tst_QColorTransform::mapQColor()
QVERIFY(result.blueF() >= 1.0f);
}
+void tst_QColorTransform::mapRGB32Prepared_data()
+{
+ mapRGB32_data();
+}
+
+void tst_QColorTransform::mapRGB32Prepared()
+{
+ QFETCH(QColorTransform, transform);
+ QFETCH(bool, sharesRed);
+
+ // The same tests as mapRGB32 but prepared, to use the LUT code-paths
+ if (!transform.isIdentity())
+ QColorTransformPrivate::get(transform)->prepare();
+
+ QRgb testColor = qRgb(32, 64, 128);
+ QRgb result = transform.map(testColor);
+ QVERIFY(qRed(result) < qGreen(result));
+ QVERIFY(qGreen(result) < qBlue(result));
+ QCOMPARE(qAlpha(result), 255);
+ if (transform.isIdentity())
+ QVERIFY(result == testColor);
+ else
+ QVERIFY(result != testColor);
+
+ testColor = qRgb(128, 64, 32);
+ result = transform.map(testColor);
+ QVERIFY(qRed(result) > qGreen(result));
+ QVERIFY(qGreen(result) > qBlue(result));
+ QCOMPARE(qAlpha(result), 255);
+ if (transform.isIdentity())
+ QVERIFY(result == testColor);
+ else
+ QVERIFY(result != testColor);
+
+ testColor = qRgba(15, 31, 63, 128);
+ result = transform.map(testColor);
+ QVERIFY(qRed(result) < qGreen(result));
+ QVERIFY(qGreen(result) < qBlue(result));
+ QCOMPARE(qAlpha(result), 128);
+ if (transform.isIdentity())
+ QVERIFY(result == testColor);
+ else
+ QVERIFY(result != testColor);
+
+ testColor = qRgb(0, 0, 0);
+ result = transform.map(testColor);
+ QCOMPARE(qRed(result), 0);
+ QCOMPARE(qGreen(result), 0);
+ QCOMPARE(qBlue(result), 0);
+ QCOMPARE(qAlpha(result), 255);
+
+ testColor = qRgb(255, 255, 255);
+ result = transform.map(testColor);
+ QCOMPARE(qRed(result), 255);
+ QCOMPARE(qGreen(result), 255);
+ QCOMPARE(qBlue(result), 255);
+ QCOMPARE(qAlpha(result), 255);
+
+ testColor = qRgb(255, 255, 0);
+ result = transform.map(testColor);
+ QCOMPARE(qAlpha(result), 255);
+ if (sharesRed)
+ QCOMPARE(qRed(result), 255);
+
+ testColor = qRgb(0, 255, 255);
+ result = transform.map(testColor);
+ QCOMPARE(qBlue(result), 255);
+ QCOMPARE(qAlpha(result), 255);
+}
+
void tst_QColorTransform::transformIsIdentity()
{
QColorTransform ct;
diff --git a/tests/auto/gui/painting/qpagelayout/CMakeLists.txt b/tests/auto/gui/painting/qpagelayout/CMakeLists.txt
index 913619461e..2271e82b01 100644
--- a/tests/auto/gui/painting/qpagelayout/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpagelayout/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpagelayout.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_test(tst_qpagelayout
tst_qpagelayout.cpp
DEFINES
QT_USE_USING_NAMESPACE
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/painting/qpageranges/CMakeLists.txt b/tests/auto/gui/painting/qpageranges/CMakeLists.txt
index 660d4b4336..d49c43b783 100644
--- a/tests/auto/gui/painting/qpageranges/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpageranges/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpageranges.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qpageranges
SOURCES
tst_qpageranges.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/painting/qpagesize/CMakeLists.txt b/tests/auto/gui/painting/qpagesize/CMakeLists.txt
index fc6fd931c2..5728d60ebf 100644
--- a/tests/auto/gui/painting/qpagesize/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpagesize/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpagesize.pro.
#####################################################################
@@ -9,6 +12,6 @@ qt_internal_add_test(tst_qpagesize
tst_qpagesize.cpp
DEFINES
QT_USE_USING_NAMESPACE
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/painting/qpaintengine/CMakeLists.txt b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
index b843135645..23094ba9b7 100644
--- a/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpaintengine.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpaintengine
SOURCES
tst_qpaintengine.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/painting/qpainter/CMakeLists.txt b/tests/auto/gui/painting/qpainter/CMakeLists.txt
index 3d46a708e9..09ae252cd6 100644
--- a/tests/auto/gui/painting/qpainter/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpainter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpainter.pro.
#####################################################################
@@ -26,7 +29,7 @@ list(APPEND test_data "task217400.png")
qt_internal_add_test(tst_qpainter
SOURCES
tst_qpainter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -37,7 +40,7 @@ qt_internal_add_test(tst_qpainter
#####################################################################
qt_internal_extend_target(tst_qpainter CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
Qt::WidgetsPrivate
)
diff --git a/tests/auto/gui/painting/qpainterpath/BLACKLIST b/tests/auto/gui/painting/qpainterpath/BLACKLIST
deleted file mode 100644
index b3e6d3bfe4..0000000000
--- a/tests/auto/gui/painting/qpainterpath/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[contains_QPointF]
-msvc-2019
diff --git a/tests/auto/gui/painting/qpainterpath/CMakeLists.txt b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
index 47450c9146..b8e72c73ea 100644
--- a/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpainterpath.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpainterpath
SOURCES
tst_qpainterpath.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
index f4c301c42e..92f054c185 100644
--- a/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpainterpathstroker.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpainterpathstroker
SOURCES
tst_qpainterpathstroker.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/painting/qpathclipper/CMakeLists.txt b/tests/auto/gui/painting/qpathclipper/CMakeLists.txt
index 191b1b8a93..fe35efdb11 100644
--- a/tests/auto/gui/painting/qpathclipper/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpathclipper/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpathclipper.pro.
if(NOT QT_FEATURE_private_tests)
@@ -14,7 +17,7 @@ qt_internal_add_test(tst_qpathclipper
tst_qpathclipper.cpp
INCLUDE_DIRECTORIES
.
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
@@ -26,6 +29,6 @@ qt_internal_add_test(tst_qpathclipper
#####################################################################
qt_internal_extend_target(tst_qpathclipper CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY
- PUBLIC_LIBRARIES
+ LIBRARIES
m
)
diff --git a/tests/auto/gui/painting/qpdfwriter/CMakeLists.txt b/tests/auto/gui/painting/qpdfwriter/CMakeLists.txt
index c6eb5b1034..e9dacd2c38 100644
--- a/tests/auto/gui/painting/qpdfwriter/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpdfwriter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpdfwriter.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_test(tst_qpdfwriter
tst_qpdfwriter.cpp
DEFINES
QT_USE_USING_NAMESPACE
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/painting/qpen/CMakeLists.txt b/tests/auto/gui/painting/qpen/CMakeLists.txt
index 321c40fa8f..b122b47505 100644
--- a/tests/auto/gui/painting/qpen/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpen/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpen.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpen
SOURCES
tst_qpen.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/painting/qpolygon/CMakeLists.txt b/tests/auto/gui/painting/qpolygon/CMakeLists.txt
index a61529d397..86079f5916 100644
--- a/tests/auto/gui/painting/qpolygon/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpolygon/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpolygon.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qpolygon
SOURCES
tst_qpolygon.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,6 +18,6 @@ qt_internal_add_test(tst_qpolygon
#####################################################################
qt_internal_extend_target(tst_qpolygon CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY
- PUBLIC_LIBRARIES
+ LIBRARIES
m
)
diff --git a/tests/auto/gui/painting/qregion/CMakeLists.txt b/tests/auto/gui/painting/qregion/CMakeLists.txt
index 9564e0719e..8745bbe5d6 100644
--- a/tests/auto/gui/painting/qregion/CMakeLists.txt
+++ b/tests/auto/gui/painting/qregion/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qregion.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qregion
SOURCES
tst_qregion.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/painting/qtransform/CMakeLists.txt b/tests/auto/gui/painting/qtransform/CMakeLists.txt
index 4d50e2cf33..e09b634616 100644
--- a/tests/auto/gui/painting/qtransform/CMakeLists.txt
+++ b/tests/auto/gui/painting/qtransform/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtransform.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtransform
SOURCES
tst_qtransform.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,6 +18,6 @@ qt_internal_add_test(tst_qtransform
#####################################################################
qt_internal_extend_target(tst_qtransform CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY
- PUBLIC_LIBRARIES
+ LIBRARIES
m
)
diff --git a/tests/auto/gui/platform/CMakeLists.txt b/tests/auto/gui/platform/CMakeLists.txt
index fc2d330fd7..cc04190477 100644
--- a/tests/auto/gui/platform/CMakeLists.txt
+++ b/tests/auto/gui/platform/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
if(QT_FEATURE_xcb)
add_subdirectory(qx11info)
endif()
diff --git a/tests/auto/gui/platform/qx11info/CMakeLists.txt b/tests/auto/gui/platform/qx11info/CMakeLists.txt
index c4ce1f91c8..5b301523c5 100644
--- a/tests/auto/gui/platform/qx11info/CMakeLists.txt
+++ b/tests/auto/gui/platform/qx11info/CMakeLists.txt
@@ -1,7 +1,10 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
qt_internal_add_test(tst_qx11info
SOURCES
tst_qx11info.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::GuiPrivate
XCB::XCB
)
diff --git a/tests/auto/gui/qopengl/CMakeLists.txt b/tests/auto/gui/qopengl/CMakeLists.txt
index 3be29695a5..49bff36d2a 100644
--- a/tests/auto/gui/qopengl/CMakeLists.txt
+++ b/tests/auto/gui/qopengl/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qopengl.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qopengl
SOURCES
tst_qopengl.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index 4e81af6cf3..ace4d3e9ef 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -7,7 +7,9 @@
#include <QtOpenGL/qopengltextureblitter.h>
#include <QtOpenGL/QOpenGLVertexArrayObject>
#include <QtOpenGL/QOpenGLBuffer>
-#include <QtOpenGL/QOpenGLFunctions_4_2_Core>
+#if !QT_CONFIG(opengles2)
+# include <QtOpenGL/QOpenGLFunctions_4_2_Core>
+#endif
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>
#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/QOpenGLFunctions>
@@ -1586,6 +1588,13 @@ void tst_QOpenGL::bufferCreate()
buf.allocate(128);
QCOMPARE(buf.size(), 128);
+ {
+ QOpenGLBuffer moved = std::move(buf);
+ QCOMPARE_EQ(moved.isCreated(), true);
+ QCOMPARE_EQ(moved.size(), 128);
+ buf = std::move(moved);
+ }
+
buf.release();
buf.destroy();
diff --git a/tests/auto/gui/qopenglconfig/CMakeLists.txt b/tests/auto/gui/qopenglconfig/CMakeLists.txt
index d193e15c2e..bc04c0e3ee 100644
--- a/tests/auto/gui/qopenglconfig/CMakeLists.txt
+++ b/tests/auto/gui/qopenglconfig/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qopenglconfig.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "buglist.json")
qt_internal_add_test(tst_qopenglconfig
SOURCES
tst_qopenglconfig.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/qvulkan/CMakeLists.txt b/tests/auto/gui/qvulkan/CMakeLists.txt
index 7cca165ed2..ee7ab0cb15 100644
--- a/tests/auto/gui/qvulkan/CMakeLists.txt
+++ b/tests/auto/gui/qvulkan/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qvulkan.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qvulkan
SOURCES
tst_qvulkan.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/qvulkan/tst_qvulkan.cpp b/tests/auto/gui/qvulkan/tst_qvulkan.cpp
index f01777a1e9..88171a80c6 100644
--- a/tests/auto/gui/qvulkan/tst_qvulkan.cpp
+++ b/tests/auto/gui/qvulkan/tst_qvulkan.cpp
@@ -137,15 +137,17 @@ void tst_QVulkan::vulkan11()
QByteArray deviceUuid = QByteArray::fromRawData((const char *) deviceIdProps.deviceUUID, VK_UUID_SIZE).toHex();
QByteArray driverUuid = QByteArray::fromRawData((const char *) deviceIdProps.driverUUID, VK_UUID_SIZE).toHex();
qDebug() << "deviceUUID" << deviceUuid << "driverUUID" << driverUuid;
+ const bool deviceUuidZero = std::find_if(deviceUuid.cbegin(), deviceUuid.cend(), [](char c) -> bool { return c; }) == deviceUuid.cend();
+ const bool driverUuidZero = std::find_if(driverUuid.cbegin(), driverUuid.cend(), [](char c) -> bool { return c; }) == driverUuid.cend();
// deviceUUID cannot be all zero as per spec
- bool seenNonZero = false;
- for (int i = 0; i < VK_UUID_SIZE; ++i) {
- if (deviceIdProps.deviceUUID[i]) {
- seenNonZero = true;
- break;
- }
+ if (!driverUuidZero) {
+ // ...but then there are implementations such as some
+ // versions of Mesa lavapipe, that returns all zeroes
+ // for both uuids. skip the check if the driver uuid
+ // was zero too.
+ // https://gitlab.freedesktop.org/mesa/mesa/-/issues/5875
+ QVERIFY(!deviceUuidZero);
}
- QVERIFY(seenNonZero);
} else {
qDebug("Physical device is not Vulkan 1.1 capable");
}
diff --git a/tests/auto/gui/rhi/CMakeLists.txt b/tests/auto/gui/rhi/CMakeLists.txt
index 786e121f00..2d7b2d651d 100644
--- a/tests/auto/gui/rhi/CMakeLists.txt
+++ b/tests/auto/gui/rhi/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from rhi.pro.
add_subdirectory(qshader)
diff --git a/tests/auto/gui/rhi/qrhi/CMakeLists.txt b/tests/auto/gui/rhi/qrhi/CMakeLists.txt
index e0e97f6509..3ac91893bd 100644
--- a/tests/auto/gui/rhi/qrhi/CMakeLists.txt
+++ b/tests/auto/gui/rhi/qrhi/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qrhi.pro.
#####################################################################
@@ -13,7 +16,7 @@ file(GLOB_RECURSE qrhi_resource_files
qt_internal_add_test(tst_qrhi
SOURCES
tst_qrhi.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
TESTDATA ${qrhi_resource_files}
diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
index 6409c43bc4..76527f83ed 100644
--- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
+++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
@@ -52,6 +52,8 @@ private slots:
void rhiTestDataOpenGL();
void create_data();
void create();
+ void stats_data();
+ void stats();
void nativeHandles_data();
void nativeHandles();
void nativeHandlesImportVulkan();
@@ -163,6 +165,12 @@ private:
void tst_QRhi::initTestCase()
{
#ifdef TST_GL
+ QSurfaceFormat fmt;
+ fmt.setDepthBufferSize(24);
+ fmt.setStencilBufferSize(8);
+ QSurfaceFormat::setDefaultFormat(fmt);
+
+ initParams.gl.format = QSurfaceFormat::defaultFormat();
fallbackSurface = QRhiGles2InitParams::newFallbackSurface();
initParams.gl.fallbackSurface = fallbackSurface;
#endif
@@ -255,6 +263,7 @@ void tst_QRhi::create()
QCOMPARE(rhi->backend(), impl);
QVERIFY(strcmp(rhi->backendName(), ""));
+ QVERIFY(!strcmp(rhi->backendName(), QRhi::backendName(rhi->backend())));
QVERIFY(!rhi->driverInfo().deviceName.isEmpty());
QCOMPARE(rhi->thread(), QThread::currentThread());
@@ -399,6 +408,38 @@ void tst_QRhi::create()
}
}
+void tst_QRhi::stats_data()
+{
+ rhiTestData();
+}
+
+void tst_QRhi::stats()
+{
+ QFETCH(QRhi::Implementation, impl);
+ QFETCH(QRhiInitParams *, initParams);
+
+ QScopedPointer<QRhi> rhi(QRhi::create(impl, initParams, QRhi::Flags(), nullptr));
+ if (!rhi)
+ QSKIP("QRhi could not be created, skipping testing statistics getter");
+
+ QRhiStats stats = rhi->statistics();
+ qDebug() << stats;
+ QCOMPARE(stats.totalPipelineCreationTime, 0);
+
+ if (impl == QRhi::Vulkan) {
+ QScopedPointer<QRhiBuffer> buf(rhi->newBuffer(QRhiBuffer::Immutable, QRhiBuffer::VertexBuffer, 32768));
+ QVERIFY(buf->create());
+ QScopedPointer<QRhiTexture> tex(rhi->newTexture(QRhiTexture::RGBA8, QSize(1024, 1024)));
+ QVERIFY(tex->create());
+
+ stats = rhi->statistics();
+ qDebug() << stats;
+ QVERIFY(stats.allocCount > 0);
+ QVERIFY(stats.blockCount > 0);
+ QVERIFY(stats.usedBytes > 0);
+ }
+}
+
void tst_QRhi::nativeHandles_data()
{
rhiTestData();
@@ -675,7 +716,6 @@ void tst_QRhi::nativeHandlesImportOpenGL()
#ifdef TST_GL
QRhiGles2NativeHandles h;
QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext);
- ctx->setFormat(QRhiGles2InitParams::adjustedFormat());
if (!ctx->create())
QSKIP("No OpenGL context, skipping OpenGL-specific test");
h.context = ctx.data();
@@ -1016,7 +1056,7 @@ void tst_QRhi::resourceUpdateBatchRGBATextureUpload()
QRhiResourceUpdateBatch *batch = rhi->nextResourceUpdateBatch();
- QRhiTextureUploadEntry upload(0, 0, { image.constBits(), int(image.sizeInBytes()) });
+ QRhiTextureUploadEntry upload(0, 0, { image.constBits(), quint32(image.sizeInBytes()) });
QRhiTextureUploadDescription uploadDesc(upload);
batch->uploadTexture(texture.data(), uploadDesc);
@@ -1104,8 +1144,8 @@ void tst_QRhi::resourceUpdateBatchRGBATextureUpload()
// SourceTopLeft is not supported for non-QImage-based uploads.
const QImage im = image.copy(QRect(greenRectPos, copySize));
QRhiTextureSubresourceUploadDescription desc;
- desc.setData(QByteArray::fromRawData(reinterpret_cast<const char *>(im.constBits()),
- int(im.sizeInBytes())));
+ desc.setData(QByteArray::fromRawData(reinterpret_cast<const char *>(im.constBits()), im.sizeInBytes()));
+
desc.setSourceSize(copySize);
desc.setDestinationTopLeft(QPoint(gap, gap));
@@ -3234,7 +3274,6 @@ void tst_QRhi::setWindowType(QWindow *window, QRhi::Implementation impl)
switch (impl) {
#ifdef TST_GL
case QRhi::OpenGLES2:
- window->setFormat(QRhiGles2InitParams::adjustedFormat());
window->setSurfaceType(QSurface::OpenGLSurface);
break;
#endif
diff --git a/tests/auto/gui/rhi/qshader/CMakeLists.txt b/tests/auto/gui/rhi/qshader/CMakeLists.txt
index 9807b19e53..b710a8b4b7 100644
--- a/tests/auto/gui/rhi/qshader/CMakeLists.txt
+++ b/tests/auto/gui/rhi/qshader/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qshader.pro.
#####################################################################
@@ -13,7 +16,7 @@ file(GLOB_RECURSE qshader_resource_files
qt_internal_add_test(tst_qshader
SOURCES
tst_qshader.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
TESTDATA ${qshader_resource_files}
diff --git a/tests/auto/gui/rhi/qshader/tst_qshader.cpp b/tests/auto/gui/rhi/qshader/tst_qshader.cpp
index cd883b34d9..40aa9d9a87 100644
--- a/tests/auto/gui/rhi/qshader/tst_qshader.cpp
+++ b/tests/auto/gui/rhi/qshader/tst_qshader.cpp
@@ -18,6 +18,7 @@ private slots:
void genVariants();
void shaderDescImplicitSharing();
void bakedShaderImplicitSharing();
+ void sortedKeys();
void mslResourceMapping();
void serializeShaderDesc();
void comparison();
@@ -238,6 +239,16 @@ void tst_QShader::bakedShaderImplicitSharing()
}
}
+void tst_QShader::sortedKeys()
+{
+ QShader s = getShader(QLatin1String(":/data/texture_all_v4.frag.qsb"));
+ QVERIFY(s.isValid());
+ QList<QShaderKey> availableShaders = s.availableShaders();
+ QCOMPARE(availableShaders.count(), 7);
+ std::sort(availableShaders.begin(), availableShaders.end());
+ QCOMPARE(availableShaders, s.availableShaders());
+}
+
void tst_QShader::mslResourceMapping()
{
QShader s = getShader(QLatin1String(":/data/texture_all_v4.frag.qsb"));
diff --git a/tests/auto/gui/text/CMakeLists.txt b/tests/auto/gui/text/CMakeLists.txt
index 5040060a33..365919cbe3 100644
--- a/tests/auto/gui/text/CMakeLists.txt
+++ b/tests/auto/gui/text/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from text.pro.
add_subdirectory(qabstracttextdocumentlayout)
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt b/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
index f78e1d81c7..940a8939d8 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qabstracttextdocumentlayout.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qabstracttextdocumentlayout
SOURCES
tst_qabstracttextdocumentlayout.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/text/qcssparser/CMakeLists.txt b/tests/auto/gui/text/qcssparser/CMakeLists.txt
index bd9ca00d60..83522f5a6c 100644
--- a/tests/auto/gui/text/qcssparser/CMakeLists.txt
+++ b/tests/auto/gui/text/qcssparser/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcssparser.pro.
#####################################################################
@@ -13,7 +16,7 @@ file(GLOB_RECURSE test_data
qt_internal_add_test(tst_qcssparser
SOURCES
tst_qcssparser.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
Qt::Xml
diff --git a/tests/auto/gui/text/qfont/BLACKLIST b/tests/auto/gui/text/qfont/BLACKLIST
index 3629f1fee6..f85d8ceebb 100644
--- a/tests/auto/gui/text/qfont/BLACKLIST
+++ b/tests/auto/gui/text/qfont/BLACKLIST
@@ -1,10 +1,8 @@
[defaultFamily:cursive]
-ubuntu-20.04
centos
b2qt
rhel
[defaultFamily:fantasy]
-ubuntu-20.04
centos
b2qt
rhel
diff --git a/tests/auto/gui/text/qfont/CMakeLists.txt b/tests/auto/gui/text/qfont/CMakeLists.txt
index 048416495b..bf19e403de 100644
--- a/tests/auto/gui/text/qfont/CMakeLists.txt
+++ b/tests/auto/gui/text/qfont/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfont.pro.
#####################################################################
@@ -13,7 +16,7 @@ set(testfont_resource_files
qt_internal_add_test(tst_qfont
SOURCES
tst_qfont.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -26,6 +29,6 @@ qt_internal_add_test(tst_qfont
#####################################################################
qt_internal_extend_target(tst_qfont CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index a663468d0f..4b3d4bfddb 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -589,6 +589,11 @@ void tst_QFont::defaultFamily()
break;
}
}
+
+#if defined(Q_OS_UNIX) && defined(QT_NO_FONTCONFIG)
+ QSKIP("This platform does not support checking for default font acceptability");
+#endif
+
#ifdef Q_PROCESSOR_ARM_32
if (QTestPrivate::isRunningArmOnX86())
QEXPECT_FAIL("", "Fails on ARMv7 QEMU (QTQAINFRA-4127)", Continue);
diff --git a/tests/auto/gui/text/qfontcache/CMakeLists.txt b/tests/auto/gui/text/qfontcache/CMakeLists.txt
index fb93c91e0c..0f603afc76 100644
--- a/tests/auto/gui/text/qfontcache/CMakeLists.txt
+++ b/tests/auto/gui/text/qfontcache/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfontcache.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qfontcache
SOURCES
tst_qfontcache.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qfontdatabase/CMakeLists.txt b/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
index 73ab56d49f..86b94a579e 100644
--- a/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
+++ b/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfontdatabase.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "LED_REAL.TTF")
qt_internal_add_test(tst_qfontdatabase
SOURCES
tst_qfontdatabase.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qfontmetrics/CMakeLists.txt b/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
index d7a22671d6..10c2400bd4 100644
--- a/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
+++ b/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfontmetrics.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qfontmetrics
SOURCES
tst_qfontmetrics.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qglyphrun/BLACKLIST b/tests/auto/gui/text/qglyphrun/BLACKLIST
index 72b20ca4b1..86e857fb23 100644
--- a/tests/auto/gui/text/qglyphrun/BLACKLIST
+++ b/tests/auto/gui/text/qglyphrun/BLACKLIST
@@ -2,5 +2,6 @@
[mixedScripts]
ubuntu-18.04
ubuntu-20.04
+ubuntu-22.04
# QTBUG-100928
qnx
diff --git a/tests/auto/gui/text/qglyphrun/CMakeLists.txt b/tests/auto/gui/text/qglyphrun/CMakeLists.txt
index 4c5a7c44c0..ec039fb605 100644
--- a/tests/auto/gui/text/qglyphrun/CMakeLists.txt
+++ b/tests/auto/gui/text/qglyphrun/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qglyphrun.pro.
#####################################################################
@@ -15,7 +18,7 @@ set(testdata_resource_files
qt_internal_add_test(tst_qglyphrun
SOURCES
tst_qglyphrun.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${testdata_resource_files}
BUILTIN_TESTDATA
diff --git a/tests/auto/gui/text/qinputcontrol/CMakeLists.txt b/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
index 048a96ef77..e3800d8ab4 100644
--- a/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
+++ b/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qinputcontrol.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qinputcontrol
SOURCES
tst_qinputcontrol.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/text/qrawfont/CMakeLists.txt b/tests/auto/gui/text/qrawfont/CMakeLists.txt
index c7a883d9ce..036f6806e3 100644
--- a/tests/auto/gui/text/qrawfont/CMakeLists.txt
+++ b/tests/auto/gui/text/qrawfont/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qrawfont.pro.
#####################################################################
@@ -17,7 +20,7 @@ set(testdata_resource_files
qt_internal_add_test(tst_qrawfont
SOURCES
tst_qrawfont.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qstatictext/CMakeLists.txt b/tests/auto/gui/text/qstatictext/CMakeLists.txt
index a7ba4e392a..06d4ec3921 100644
--- a/tests/auto/gui/text/qstatictext/CMakeLists.txt
+++ b/tests/auto/gui/text/qstatictext/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstatictext.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qstatictext
SOURCES
tst_qstatictext.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,7 +18,7 @@ qt_internal_add_test(tst_qstatictext
#####################################################################
qt_internal_extend_target(tst_qstatictext CONDITION QT_FEATURE_private_tests
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
)
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index 397a116a73..e6e16374d3 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -82,11 +82,6 @@ private:
Q_DECLARE_METATYPE(QImage::Format);
-static bool isPlatformWayland()
-{
- return QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
-}
-
void tst_QStaticText::constructionAndDestruction()
{
QStaticText text("My text");
@@ -148,8 +143,6 @@ void tst_QStaticText::drawToPoint()
}
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -190,8 +183,6 @@ void tst_QStaticText::drawToRect()
#endif
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -246,13 +237,11 @@ void tst_QStaticText::compareToDrawText()
#if defined(DEBUG_SAVE_IMAGE)
imageDrawText.save("compareToDrawText_imageDrawText.png");
- imageDrawStaticText.save("compareToDrawText_imageDrawStaticPlainText.png");
- imageDrawStaticText.save("compareToDrawText_imageDrawStaticRichText.png");
+ imageDrawStaticPlainText.save("compareToDrawText_imageDrawStaticPlainText.png");
+ imageDrawStaticRichText.save("compareToDrawText_imageDrawStaticRichText.png");
#endif
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- if (isPlatformWayland() && font == QFont())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticPlainText, imageDrawText);
QCOMPARE(imageDrawStaticRichText, imageDrawText);
}
@@ -360,8 +349,6 @@ void tst_QStaticText::setFont()
#endif
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -385,8 +372,6 @@ void tst_QStaticText::setTextWidth()
}
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -414,8 +399,6 @@ void tst_QStaticText::translatedPainter()
}
QVERIFY(imageDrawText.toImage() != m_whiteSquare);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -456,8 +439,6 @@ void tst_QStaticText::rotatedPainter()
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -488,8 +469,6 @@ void tst_QStaticText::scaledPainter()
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
@@ -617,8 +596,6 @@ void tst_QStaticText::transformationChanged()
if (!supportsTransformations())
QEXPECT_FAIL("", "Graphics system does not support transformed text on this platform", Abort);
- if (isPlatformWayland())
- QEXPECT_FAIL("", "Wayland: This fails. See QTBUG-100982.", Abort);
QCOMPARE(imageDrawStaticText, imageDrawText);
}
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt b/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
index 9ac732cee0..880b4b961e 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
+++ b/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsyntaxhighlighter.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qsyntaxhighlighter
SOURCES
tst_qsyntaxhighlighter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,6 +18,6 @@ qt_internal_add_test(tst_qsyntaxhighlighter
#####################################################################
qt_internal_extend_target(tst_qsyntaxhighlighter CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/text/qtextblock/CMakeLists.txt b/tests/auto/gui/text/qtextblock/CMakeLists.txt
index aedd6c27a3..54b5f0bde7 100644
--- a/tests/auto/gui/text/qtextblock/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextblock/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextblock.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextblock
SOURCES
tst_qtextblock.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextcursor/CMakeLists.txt b/tests/auto/gui/text/qtextcursor/CMakeLists.txt
index a82dc928e9..3e0e1a27da 100644
--- a/tests/auto/gui/text/qtextcursor/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextcursor/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextcursor.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextcursor
SOURCES
tst_qtextcursor.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextdocument/CMakeLists.txt b/tests/auto/gui/text/qtextdocument/CMakeLists.txt
index bff5cabfb7..1bcbbb4072 100644
--- a/tests/auto/gui/text/qtextdocument/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextdocument/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextdocument.pro.
#####################################################################
@@ -8,7 +11,7 @@ qt_internal_add_test(tst_qtextdocument
SOURCES
common.h
tst_qtextdocument.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index ad9e1965b6..d10027b7a0 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -274,6 +274,8 @@ void tst_QTextDocument::init()
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
+ "li.unchecked::marker { content: \"\\2610\"; }\n"
+ "li.checked::marker { content: \"\\2612\"; }\n"
"</style></head>"
"<body style=\" font-family:'%1'; font-size:%2; font-weight:%3; font-style:%4;\">\n");
htmlHead = htmlHead.arg(defaultFont.family())
@@ -1371,7 +1373,7 @@ void tst_QTextDocument::toHtml_data()
QTest::newRow("lists") << QTextDocumentFragment(&doc)
<<
QString("EMPTYBLOCK") +
- QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blubb</li>\n<li DEFAULTBLOCKSTYLE>Blah</li></ul>");
+ QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\">\n<li DEFAULTBLOCKSTYLE>Blubb</li>\n<li DEFAULTBLOCKSTYLE>Blah</li></ul>");
}
{
@@ -1394,7 +1396,7 @@ void tst_QTextDocument::toHtml_data()
QTest::newRow("charfmt-for-list-item") << QTextDocumentFragment(&doc)
<<
QString("EMPTYBLOCK") +
- QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blubb</li>\n<li style=\" color:#0000ff;\" DEFAULTBLOCKSTYLE><span style=\" color:#ff0000;\">Blah</span></li></ul>");
+ QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\">\n<li DEFAULTBLOCKSTYLE>Blubb</li>\n<li style=\" color:#0000ff;\" DEFAULTBLOCKSTYLE><span style=\" color:#ff0000;\">Blah</span></li></ul>");
}
{
@@ -1424,7 +1426,7 @@ void tst_QTextDocument::toHtml_data()
QTest::newRow("list-indent") << QTextDocumentFragment(&doc)
<<
QString("EMPTYBLOCK") +
- QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 4;\"><li DEFAULTBLOCKSTYLE>Blah</li></ul>");
+ QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 4;\">\n<li DEFAULTBLOCKSTYLE>Blah</li></ul>");
}
{
@@ -1712,7 +1714,7 @@ void tst_QTextDocument::toHtml_data()
QTest::newRow("list-ul-margin") << QTextDocumentFragment(&doc)
<< QString("EMPTYBLOCK") +
- QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li DEFAULTBLOCKSTYLE>Blah</li></ul>");
+ QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\">\n<li DEFAULTBLOCKSTYLE>Blah</li></ul>");
}
{
CREATE_DOC_AND_CURSOR();
@@ -1722,12 +1724,12 @@ void tst_QTextDocument::toHtml_data()
cursor.insertHtml(listHtml);
QTest::newRow("nested-lists-one") << QTextDocumentFragment(&doc)
- << QString("<ul DEFAULTULSTYLE 1;\"><li style=\" margin-top:12px; margin-bottom:0px; "
+ << QString("<ul DEFAULTULSTYLE 1;\">\n<li style=\" margin-top:12px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
- "item-1</li>\n<li DEFAULTBLOCKSTYLE>item-2\n<ul DEFAULTULSTYLE 2;\"><li "
+ "item-1</li>\n<li DEFAULTBLOCKSTYLE>item-2\n<ul DEFAULTULSTYLE 2;\">\n<li "
"DEFAULTBLOCKSTYLE>item-2.1</li>\n<li DEFAULTBLOCKSTYLE>item-2.2\n<ul "
- "DEFAULTULSTYLE 3;\"><li DEFAULTBLOCKSTYLE>item-2.2.1</li></ul></li>\n"
- "<li DEFAULTBLOCKSTYLE>item-2.3\n<ul DEFAULTULSTYLE 3;\"><li DEFAULTBLOCKSTYLE>"
+ "DEFAULTULSTYLE 3;\">\n<li DEFAULTBLOCKSTYLE>item-2.2.1</li></ul></li>\n"
+ "<li DEFAULTBLOCKSTYLE>item-2.3\n<ul DEFAULTULSTYLE 3;\">\n<li DEFAULTBLOCKSTYLE>"
"item-2.3.1</li></ul></li></ul></li>\n<li DEFAULTLASTLISTYLE>item-3</li></ul>");
}
{
@@ -1736,9 +1738,9 @@ void tst_QTextDocument::toHtml_data()
cursor.insertHtml(listHtml);
QTest::newRow("nested-lists-two") << QTextDocumentFragment(&doc)
- << QString("<ul DEFAULTULSTYLE 1;\"><li style=\" margin-top:12px; margin-bottom:0px; "
+ << QString("<ul DEFAULTULSTYLE 1;\">\n<li style=\" margin-top:12px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
- "item-1</li>\n<li DEFAULTLASTLISTYLE>item-2\n<ul DEFAULTULSTYLE 2;\"><li "
+ "item-1</li>\n<li DEFAULTLASTLISTYLE>item-2\n<ul DEFAULTULSTYLE 2;\">\n<li "
"DEFAULTBLOCKSTYLE>item-2.1</li></ul></li></ul>");
}
{
@@ -1748,9 +1750,9 @@ void tst_QTextDocument::toHtml_data()
cursor.insertHtml(listHtml);
QTest::newRow("nested-lists-three") << QTextDocumentFragment(&doc)
- << QString("<ul DEFAULTULSTYLE 1;\"><li style=\" margin-top:12px; margin-bottom:0px; "
+ << QString("<ul DEFAULTULSTYLE 1;\">\n<li style=\" margin-top:12px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
- "item-1</li>\n<li DEFAULTLASTLISTYLE>item-2\n<ul DEFAULTULSTYLE 2;\"><li "
+ "item-1</li>\n<li DEFAULTLASTLISTYLE>item-2\n<ul DEFAULTULSTYLE 2;\">\n<li "
"DEFAULTBLOCKSTYLE>item-2.1</li>\n<li DEFAULTBLOCKSTYLE>item-2.2</li></ul>"
"</li></ul>");
}
@@ -1761,12 +1763,23 @@ void tst_QTextDocument::toHtml_data()
cursor.insertHtml(listHtml);
QTest::newRow("not-nested-list") << QTextDocumentFragment(&doc)
- << QString("<ul DEFAULTULSTYLE 1;\"><li style=\" margin-top:12px; margin-bottom:0px; "
+ << QString("<ul DEFAULTULSTYLE 1;\">\n<li style=\" margin-top:12px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
- "item-1.1</li>\n<li DEFAULTBLOCKSTYLE>item-1.2</li></ul>\n<ul DEFAULTULSTYLE 1;\">"
+ "item-1.1</li>\n<li DEFAULTBLOCKSTYLE>item-1.2</li></ul>\n<ul DEFAULTULSTYLE 1;\">\n"
"<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; "
"margin-right:0px; -qt-block-indent:0; text-indent:0px;\">item-2.1</li></ul>");
}
+ {
+ CREATE_DOC_AND_CURSOR();
+ const QString listHtml = "<ul><li>bullet</li><li class=\"unchecked\">unchecked item</li><li class=\"checked\">checked item</li></ul>";
+ cursor.insertHtml(listHtml);
+
+ QTest::newRow("list with and without checkboxes") << QTextDocumentFragment(&doc)
+ << QString("<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\">\n"
+ "<li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">bullet</li>\n"
+ "<li class=\"unchecked\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">unchecked item</li>\n"
+ "<li class=\"checked\" style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">checked item</li></ul>");
+ }
}
void tst_QTextDocument::toHtml()
diff --git a/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt b/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
index 6f1207c49a..3787469efb 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextdocumentfragment.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextdocumentfragment
SOURCES
tst_qtextdocumentfragment.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt b/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
index da41073962..9c45a0dd83 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextdocumentlayout.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextdocumentlayout
SOURCES
tst_qtextdocumentlayout.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,6 +18,6 @@ qt_internal_add_test(tst_qtextdocumentlayout
#####################################################################
qt_internal_extend_target(tst_qtextdocumentlayout CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/text/qtextformat/CMakeLists.txt b/tests/auto/gui/text/qtextformat/CMakeLists.txt
index cacd7fbd18..b41e09e250 100644
--- a/tests/auto/gui/text/qtextformat/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextformat/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextformat.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextformat
SOURCES
tst_qtextformat.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
index a998bbd482..9ef5842803 100644
--- a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
@@ -679,7 +679,7 @@ void tst_QTextFormat::dataStreamCompatibility()
QVERIFY(properties.contains(QTextFormat::FontFamilies));
QVERIFY(!properties.contains(QTextFormat::OldFontLetterSpacingType));
QVERIFY(!properties.contains(QTextFormat::OldFontStretch));
- QVERIFY(!properties.contains(QTextFormat::FontFamily));
+ QVERIFY(!properties.contains(QTextFormat::OldFontFamily));
}
QByteArray memory;
@@ -710,7 +710,7 @@ void tst_QTextFormat::dataStreamCompatibility()
QVERIFY(properties.contains(QTextFormat::FontFamilies));
QVERIFY(!properties.contains(QTextFormat::OldFontLetterSpacingType));
QVERIFY(!properties.contains(QTextFormat::OldFontStretch));
- QVERIFY(!properties.contains(QTextFormat::FontFamily));
+ QVERIFY(!properties.contains(QTextFormat::OldFontFamily));
}
}
@@ -730,7 +730,7 @@ void tst_QTextFormat::dataStreamCompatibility()
QVERIFY(properties.contains(QTextFormat::FontFamilies));
QVERIFY(!properties.contains(QTextFormat::OldFontLetterSpacingType));
QVERIFY(!properties.contains(QTextFormat::OldFontStretch));
- QVERIFY(!properties.contains(QTextFormat::FontFamily));
+ QVERIFY(!properties.contains(QTextFormat::OldFontFamily));
}
}
@@ -763,7 +763,7 @@ void tst_QTextFormat::dataStreamCompatibility()
QVERIFY(properties.contains(QTextFormat::FontFamilies));
QVERIFY(!properties.contains(QTextFormat::OldFontLetterSpacingType));
QVERIFY(!properties.contains(QTextFormat::OldFontStretch));
- QVERIFY(!properties.contains(QTextFormat::FontFamily));
+ QVERIFY(!properties.contains(QTextFormat::OldFontFamily));
}
}
@@ -785,7 +785,7 @@ void tst_QTextFormat::dataStreamCompatibility()
QVERIFY(!properties.contains(QTextFormat::FontFamilies));
QVERIFY(properties.contains(QTextFormat::OldFontLetterSpacingType));
QVERIFY(properties.contains(QTextFormat::OldFontStretch));
- QVERIFY(properties.contains(QTextFormat::FontFamily));
+ QVERIFY(properties.contains(QTextFormat::OldFontFamily));
}
}
diff --git a/tests/auto/gui/text/qtextlayout/CMakeLists.txt b/tests/auto/gui/text/qtextlayout/CMakeLists.txt
index 3fb5dea8b9..e96d08480d 100644
--- a/tests/auto/gui/text/qtextlayout/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextlayout/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextlayout.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextlayout
SOURCES
tst_qtextlayout.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextlist/CMakeLists.txt b/tests/auto/gui/text/qtextlist/CMakeLists.txt
index 2f325d5e17..4a3136b2df 100644
--- a/tests/auto/gui/text/qtextlist/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextlist/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextlist.pro.
#####################################################################
@@ -8,7 +11,7 @@ qt_internal_add_test(tst_qtextlist
SOURCES
../qtextdocument/common.h
tst_qtextlist.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt b/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
index 3f23f03c3d..c7182bd116 100644
--- a/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextmarkdownimporter.pro.
#####################################################################
@@ -13,7 +16,7 @@ list(APPEND test_data "data/fuzz20580.md")
qt_internal_add_test(tst_qtextmarkdownimporter
SOURCES
tst_qtextmarkdownimporter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt b/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
index 884195345c..fd53b40c54 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextmarkdownwriter.pro.
#####################################################################
@@ -11,7 +14,7 @@ list(APPEND test_data "data/blockquotes.md")
qt_internal_add_test(tst_qtextmarkdownwriter
SOURCES
tst_qtextmarkdownwriter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md b/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md
index b29b53651b..a021f15aba 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md
+++ b/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md
@@ -13,8 +13,7 @@ MacFarlane writes:
> > as readable as possible. The idea is that a Markdown-formatted document should
> > be publishable as-is, as plain text, without looking like it's been marked up
> > with tags or formatting instructions. (
-> > [http://daringfireball.net/projects/markdown/](http://daringfireball.net/projects/markdown/)
-> > )
+> > <http://daringfireball.net/projects/markdown/> )
> The point can be illustrated by comparing a sample of AsciiDoc with an
> equivalent sample of Markdown. Here is a sample of AsciiDoc from the AsciiDoc
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/data/example.md b/tests/auto/gui/text/qtextmarkdownwriter/data/example.md
index a9a157f25a..15b30598e6 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/data/example.md
+++ b/tests/auto/gui/text/qtextmarkdownwriter/data/example.md
@@ -83,7 +83,7 @@ is used extensively in
[Qt Assistant](http://doc.qt.io/qt-5/qtassistant-index.html). Hyperlinks are
automatically created when an HTML file is imported into an editor. Since the
rich text framework supports hyperlinks natively, they can also be created
-programatically.
+programmatically.
## Undo and Redo
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/data/links.md b/tests/auto/gui/text/qtextmarkdownwriter/data/links.md
index 33cdb2b3ab..c9aae80c67 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/data/links.md
+++ b/tests/auto/gui/text/qtextmarkdownwriter/data/links.md
@@ -23,3 +23,6 @@ title")
* [link](/url "title
title title")
* nonlink
+
+Qt has the <https://qt.io> site
+
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp b/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp
index b258869dfd..2b6b1ecca5 100644
--- a/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp
+++ b/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp
@@ -502,6 +502,9 @@ void tst_QTextMarkdownWriter::fromHtml_data()
QTest::newRow("preformats with embedded backticks") <<
"<pre>none `one` ``two``</pre>plain<pre>```three``` ````four````</pre>plain" <<
"```\nnone `one` ``two``\n\n```\nplain\n\n```\n```three``` ````four````\n\n```\nplain\n\n";
+ QTest::newRow("list items with and without checkboxes") <<
+ "<ul><li>bullet</li><li class=\"unchecked\">unchecked item</li><li class=\"checked\">checked item</li></ul>" <<
+ "- bullet\n- [ ] unchecked item\n- [x] checked item\n";
}
void tst_QTextMarkdownWriter::fromHtml()
diff --git a/tests/auto/gui/text/qtextobject/CMakeLists.txt b/tests/auto/gui/text/qtextobject/CMakeLists.txt
index 07ea132de0..1544f72df2 100644
--- a/tests/auto/gui/text/qtextobject/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextobject/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextobject.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextobject
SOURCES
tst_qtextobject.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,6 +18,6 @@ qt_internal_add_test(tst_qtextobject
#####################################################################
qt_internal_extend_target(tst_qtextobject CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt b/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
index 2a468b0c5e..6ee06a353e 100644
--- a/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextodfwriter.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextodfwriter
SOURCES
tst_qtextodfwriter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt b/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
index 49cfcfab6a..5ac46e2ad7 100644
--- a/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextpiecetable.pro.
if(WIN32)
@@ -15,7 +18,7 @@ qt_internal_add_test(tst_qtextpiecetable
SOURCES
../qtextdocument/common.h
tst_qtextpiecetable.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt b/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
index 01d418ebd4..c326a519c6 100644
--- a/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextscriptengine.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtextscriptengine
SOURCES
tst_qtextscriptengine.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt b/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
index d3b6b1dc6d..3fc205dd94 100644
--- a/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
+++ b/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from generate.pro.
#####################################################################
@@ -9,9 +12,8 @@ qt_internal_add_executable(generate
SOURCES
main.cpp
INCLUDE_DIRECTORIES
- .
/usr/include/freetype2
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
)
diff --git a/tests/auto/gui/text/qtexttable/CMakeLists.txt b/tests/auto/gui/text/qtexttable/CMakeLists.txt
index 94d33d3530..fb5bd28b2d 100644
--- a/tests/auto/gui/text/qtexttable/CMakeLists.txt
+++ b/tests/auto/gui/text/qtexttable/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtexttable.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtexttable
SOURCES
tst_qtexttable.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
)
@@ -16,6 +19,6 @@ qt_internal_add_test(tst_qtexttable
#####################################################################
qt_internal_extend_target(tst_qtexttable CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/gui/text/qzip/CMakeLists.txt b/tests/auto/gui/text/qzip/CMakeLists.txt
index dceda50251..de158a020c 100644
--- a/tests/auto/gui/text/qzip/CMakeLists.txt
+++ b/tests/auto/gui/text/qzip/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qzip.pro.
#####################################################################
@@ -13,7 +16,7 @@ file(GLOB_RECURSE test_data
qt_internal_add_test(tst_qzip
SOURCES
tst_qzip.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
TESTDATA ${test_data}
diff --git a/tests/auto/gui/util/CMakeLists.txt b/tests/auto/gui/util/CMakeLists.txt
index 048e18360c..e240661e0c 100644
--- a/tests/auto/gui/util/CMakeLists.txt
+++ b/tests/auto/gui/util/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from util.pro.
add_subdirectory(qdesktopservices)
diff --git a/tests/auto/gui/util/qdesktopservices/CMakeLists.txt b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
index 475a3405c0..c95af2deb0 100644
--- a/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
+++ b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdesktopservices.pro.
#####################################################################
@@ -9,6 +12,6 @@ qt_internal_add_test(tst_qdesktopservices
tst_qdesktopservices.cpp
DEFINES
# QT_DISABLE_DEPRECATED_BEFORE=0 # special case
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
index 27996300d7..31738e8c01 100644
--- a/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
+++ b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdoublevalidator.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qdoublevalidator
SOURCES
tst_qdoublevalidator.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp
index 7818e83f09..225ac14c7f 100644
--- a/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -143,6 +143,7 @@ void tst_QDoubleValidator::validate_data()
QTest::newRow("data56") << "C" << 1229.0 << 1231.0 << -1 << QString("123E+") << ITM << INV;
QTest::newRow("data57") << "C" << 1229.0 << 1231.0 << -1 << QString("123E+1") << ACC << INV;
QTest::newRow("data58") << "C" << 0.0 << 100.0 << -1 << QString("0.0") << ACC << ACC;
+ QTest::newRow("overlong") << "C" << 0.0 << 99.9 << 2 << QString("1234.0") << ITM << INV;
QTest::newRow("data_de0") << "de" << 0.0 << 100.0 << 1 << QString("50,0") << ACC << ACC;
QTest::newRow("data_de1") << "de" << 00.0 << 100.0 << 1 << QString("500,0") << ITM << ITM;
diff --git a/tests/auto/gui/util/qintvalidator/CMakeLists.txt b/tests/auto/gui/util/qintvalidator/CMakeLists.txt
index 83891a3541..59c4d04710 100644
--- a/tests/auto/gui/util/qintvalidator/CMakeLists.txt
+++ b/tests/auto/gui/util/qintvalidator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qintvalidator.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qintvalidator
SOURCES
tst_qintvalidator.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
index 9caf7a1596..545f0e1e89 100644
--- a/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
+++ b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qregularexpressionvalidator.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qregularexpressionvalidator
SOURCES
tst_qregularexpressionvalidator.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
index b7fc79854e..c661ce3a7b 100644
--- a/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
+++ b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtexturefilereader.pro.
#####################################################################
@@ -18,7 +21,7 @@ set(qtexturefilereader_resource_files
qt_internal_add_test(tst_qtexturefilereader
SOURCES
tst_qtexturefilereader.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::GuiPrivate
TESTDATA ${qtexturefilereader_resource_files}
diff --git a/tests/auto/gui/util/qundogroup/CMakeLists.txt b/tests/auto/gui/util/qundogroup/CMakeLists.txt
index c1396326f7..f859fe804d 100644
--- a/tests/auto/gui/util/qundogroup/CMakeLists.txt
+++ b/tests/auto/gui/util/qundogroup/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qundogroup.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qundogroup
SOURCES
tst_qundogroup.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/gui/util/qundostack/CMakeLists.txt b/tests/auto/gui/util/qundostack/CMakeLists.txt
index 0e56171add..b2c91e298e 100644
--- a/tests/auto/gui/util/qundostack/CMakeLists.txt
+++ b/tests/auto/gui/util/qundostack/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qundostack.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qundostack
SOURCES
tst_qundostack.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)