diff options
Diffstat (limited to 'tests/benchmarks/widgets/itemviews')
7 files changed, 25 insertions, 105 deletions
diff --git a/tests/benchmarks/widgets/itemviews/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/CMakeLists.txt index 76747b527d..33224ca61f 100644 --- a/tests/benchmarks/widgets/itemviews/CMakeLists.txt +++ b/tests/benchmarks/widgets/itemviews/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from itemviews.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause add_subdirectory(qtableview) add_subdirectory(qheaderview) diff --git a/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt index 74fa7a37ed..ee98e2e8c3 100644 --- a/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt +++ b/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qheaderview.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_qheaderview Binary: @@ -7,11 +8,8 @@ qt_internal_add_benchmark(tst_bench_qheaderview SOURCES qheaderviewbench.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Test Qt::Widgets ) - -#### Keys ignored in scope 1:.:.:qheaderview.pro:<TRUE>: -# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/itemviews/qheaderview/qheaderviewbench.cpp b/tests/benchmarks/widgets/itemviews/qheaderview/qheaderviewbench.cpp index ba1dc2d750..f04ca82cdc 100644 --- a/tests/benchmarks/widgets/itemviews/qheaderview/qheaderviewbench.cpp +++ b/tests/benchmarks/widgets/itemviews/qheaderview/qheaderviewbench.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Thorbjørn Lund Martsum - tmartsum[at]gmail.com -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2012 Thorbjørn Lund Martsum - tmartsum[at]gmail.com +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QtWidgets/QtWidgets> diff --git a/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt index 0a9a89f7cb..9b40adadb1 100644 --- a/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt +++ b/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qlistview.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_qlistview Binary: @@ -7,11 +8,8 @@ qt_internal_add_benchmark(tst_bench_qlistview SOURCES tst_qlistview.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Test Qt::Widgets ) - -#### Keys ignored in scope 1:.:.:qlistview.pro:<TRUE>: -# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp index 01496743c2..2e588adc58 100644 --- a/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qtest.h> #include <QListView> diff --git a/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt index 9fecbeb232..aae0f7e4e6 100644 --- a/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt +++ b/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from qtableview.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_bench_qtableview Binary: @@ -7,11 +8,8 @@ qt_internal_add_benchmark(tst_bench_qtableview SOURCES tst_qtableview.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::Test Qt::Widgets ) - -#### Keys ignored in scope 1:.:.:qtableview.pro:<TRUE>: -# TEMPLATE = "app" diff --git a/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp index 157ee7a152..e625066800 100644 --- a/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp +++ b/tests/benchmarks/widgets/itemviews/qtableview/tst_qtableview.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qtest.h> #include <QDebug> @@ -258,13 +233,13 @@ void tst_QTableView::rowInsertion_data() void tst_QTableView::rowInsertion() { - QFETCH(SpanList, spans); + QFETCH(const SpanList, spans); QtTestTableModel model(10, 10); QTableView view; view.setModel(&model); - foreach (QRect span, spans) + for (QRect span : spans) view.setSpan(span.top(), span.left(), span.height(), span.width()); view.show(); QTest::qWait(50); @@ -284,13 +259,13 @@ void tst_QTableView::rowRemoval_data() void tst_QTableView::rowRemoval() { - QFETCH(SpanList, spans); + QFETCH(const SpanList, spans); QtTestTableModel model(10, 10); QTableView view; view.setModel(&model); - foreach (QRect span, spans) + for (QRect span : spans) view.setSpan(span.top(), span.left(), span.height(), span.width()); view.show(); QTest::qWait(50); @@ -307,14 +282,14 @@ void tst_QTableView::columnInsertion_data() void tst_QTableView::columnInsertion() { - QFETCH(SpanList, spans); + QFETCH(const SpanList, spans); QtTestTableModel model(10, 10); QTableView view; view.setModel(&model); // Same set as for rowInsertion, just swapping columns and rows. - foreach (QRect span, spans) + for (QRect span : spans) view.setSpan(span.left(), span.top(), span.width(), span.height()); view.show(); QTest::qWait(50); @@ -334,14 +309,14 @@ void tst_QTableView::columnRemoval_data() void tst_QTableView::columnRemoval() { - QFETCH(SpanList, spans); + QFETCH(const SpanList, spans); QtTestTableModel model(10, 10); QTableView view; view.setModel(&model); // Same set as for rowRemoval, just swapping columns and rows. - foreach (QRect span, spans) + for (QRect span : spans) view.setSpan(span.left(), span.top(), span.width(), span.height()); view.show(); QTest::qWait(50); |