diff options
Diffstat (limited to 'tests/manual/repaint')
-rw-r--r-- | tests/manual/repaint/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/manual/repaint/mainwindow/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/mainwindow/main.cpp | 6 | ||||
-rw-r--r-- | tests/manual/repaint/scrollarea/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/scrollarea/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/repaint/shared/shared.h | 18 | ||||
-rw-r--r-- | tests/manual/repaint/splitter/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/splitter/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/repaint/tableview/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/tableview/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/repaint/task141091/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/task141091/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/repaint/toplevel/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/toplevel/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/repaint/widget/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/repaint/widget/main.cpp | 2 |
16 files changed, 41 insertions, 33 deletions
diff --git a/tests/manual/repaint/CMakeLists.txt b/tests/manual/repaint/CMakeLists.txt index fd579a76a2..909e66d8bc 100644 --- a/tests/manual/repaint/CMakeLists.txt +++ b/tests/manual/repaint/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from repaint.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause add_subdirectory(mainwindow) add_subdirectory(scrollarea) diff --git a/tests/manual/repaint/mainwindow/CMakeLists.txt b/tests/manual/repaint/mainwindow/CMakeLists.txt index f632da9827..82b0c1ccdb 100644 --- a/tests/manual/repaint/mainwindow/CMakeLists.txt +++ b/tests/manual/repaint/mainwindow/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from mainwindow.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_manual_mainwindow Binary: @@ -9,7 +10,7 @@ qt_internal_add_manual_test(tst_manual_mainwindow SOURCES ../shared/shared.h main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp index dd60547344..ea024d22a5 100644 --- a/tests/manual/repaint/mainwindow/main.cpp +++ b/tests/manual/repaint/mainwindow/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QApplication> #include <QMainWindow> @@ -26,9 +26,9 @@ int main(int argc, char **argv) QToolBar *toolBar = new QToolBar(); - toolBar->addWidget(new StaticWidget())->setVisible(true);; + toolBar->addWidget(new StaticWidget())->setVisible(true); - toolBar->addWidget(new QSpinBox())->setVisible(true);; + toolBar->addWidget(new QSpinBox())->setVisible(true); mainWindow.addToolBar(toolBar); mainWindow.resize(600, 400); diff --git a/tests/manual/repaint/scrollarea/CMakeLists.txt b/tests/manual/repaint/scrollarea/CMakeLists.txt index 54ab0fd410..a21cdb3f1c 100644 --- a/tests/manual/repaint/scrollarea/CMakeLists.txt +++ b/tests/manual/repaint/scrollarea/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from scrollarea.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_manual_scrollarea Binary: @@ -9,7 +10,7 @@ qt_internal_add_manual_test(tst_manual_scrollarea SOURCES ../shared/shared.h main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp index f520de78b2..b45a85c353 100644 --- a/tests/manual/repaint/scrollarea/main.cpp +++ b/tests/manual/repaint/scrollarea/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QApplication> #include <QMainWindow> diff --git a/tests/manual/repaint/shared/shared.h b/tests/manual/repaint/shared/shared.h index 57ce56cd85..0a69011b6c 100644 --- a/tests/manual/repaint/shared/shared.h +++ b/tests/manual/repaint/shared/shared.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QWidget> #include <QPainter> @@ -28,20 +28,20 @@ public: const int rectSize = 10; QRect rect(pos.x() - rectSize, pos.y() - rectSize, rectSize *2, rectSize * 2); - QList<QRect> updateRects; - updateRects.append(rect.translated(rectSize * 2, rectSize * 2)); - updateRects.append(rect.translated(rectSize * 2, -rectSize * 2)); - updateRects.append(rect.translated(-rectSize * 2, rectSize * 2)); - updateRects.append(rect.translated(-rectSize * 2, -rectSize * 2)); - + const QRect updateRects[] = { + rect.translated(rectSize * 2, rectSize * 2), + rect.translated(rectSize * 2, -rectSize * 2), + rect.translated(-rectSize * 2, rectSize * 2), + rect.translated(-rectSize * 2, -rectSize * 2), + }; bool useRegion = false; if (useRegion) { QRegion region; - region.setRects(updateRects.data(), 4); + region.setRects(updateRects, 4); update(region); } else { - foreach (QRect rect, updateRects) + for (QRect rect : updateRects) update(rect); } } diff --git a/tests/manual/repaint/splitter/CMakeLists.txt b/tests/manual/repaint/splitter/CMakeLists.txt index 9799abce09..f9328ed000 100644 --- a/tests/manual/repaint/splitter/CMakeLists.txt +++ b/tests/manual/repaint/splitter/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from splitter.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## splitter Binary: @@ -9,7 +10,7 @@ qt_internal_add_manual_test(splitter SOURCES ../shared/shared.h main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp index e26698c413..62f9f74d5b 100644 --- a/tests/manual/repaint/splitter/main.cpp +++ b/tests/manual/repaint/splitter/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "../shared/shared.h" diff --git a/tests/manual/repaint/tableview/CMakeLists.txt b/tests/manual/repaint/tableview/CMakeLists.txt index 1885076501..172957c631 100644 --- a/tests/manual/repaint/tableview/CMakeLists.txt +++ b/tests/manual/repaint/tableview/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from tableview.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tableview Binary: @@ -9,7 +10,7 @@ qt_internal_add_manual_test(tableview SOURCES ../shared/shared.h main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp index 9ee2e95d96..f7d04c6a60 100644 --- a/tests/manual/repaint/tableview/main.cpp +++ b/tests/manual/repaint/tableview/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "../shared/shared.h" diff --git a/tests/manual/repaint/task141091/CMakeLists.txt b/tests/manual/repaint/task141091/CMakeLists.txt index 1ef2896c03..6483e08ddb 100644 --- a/tests/manual/repaint/task141091/CMakeLists.txt +++ b/tests/manual/repaint/task141091/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from task141091.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## task141091 Binary: @@ -7,7 +8,7 @@ qt_internal_add_manual_test(task141091 SOURCES main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp index 78c280aa32..2fceea0148 100644 --- a/tests/manual/repaint/task141091/main.cpp +++ b/tests/manual/repaint/task141091/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QApplication> #include <QMainWindow> diff --git a/tests/manual/repaint/toplevel/CMakeLists.txt b/tests/manual/repaint/toplevel/CMakeLists.txt index c345ce974c..30dfcab689 100644 --- a/tests/manual/repaint/toplevel/CMakeLists.txt +++ b/tests/manual/repaint/toplevel/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from toplevel.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_manual_toplevel Binary: @@ -8,7 +9,7 @@ qt_internal_add_manual_test(tst_manual_toplevel SOURCES ../shared/shared.h main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/toplevel/main.cpp b/tests/manual/repaint/toplevel/main.cpp index b7d680a284..b93bf2fec8 100644 --- a/tests/manual/repaint/toplevel/main.cpp +++ b/tests/manual/repaint/toplevel/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "../shared/shared.h" diff --git a/tests/manual/repaint/widget/CMakeLists.txt b/tests/manual/repaint/widget/CMakeLists.txt index 2900692f1b..27097a980f 100644 --- a/tests/manual/repaint/widget/CMakeLists.txt +++ b/tests/manual/repaint/widget/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from widget.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## widget Binary: @@ -9,7 +10,7 @@ qt_internal_add_manual_test(widget SOURCES ../shared/shared.h main.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Widgets ) diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp index c69de5369f..b4400d5170 100644 --- a/tests/manual/repaint/widget/main.cpp +++ b/tests/manual/repaint/widget/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "../shared/shared.h" |