qt 6.5.1 original

This commit is contained in:
kleuter
2023-10-29 23:33:08 +01:00
parent 71d22ab6b0
commit 85d238dfda
21202 changed files with 5499099 additions and 0 deletions

View File

@ -0,0 +1,23 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
# The test is simply testing that manual specification of QT_TESTCASE_BUILDDIR works,
# despite the weird paths.
cmake_minimum_required(VERSION 3.16)
project(test_qt_testcase_builddir)
find_package(Qt6Test REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(test_qt_testcase_builddir WIN32 main.cpp)
target_link_libraries(test_qt_testcase_builddir Qt::Test)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/testdata.txt"
"${CMAKE_CURRENT_BINARY_DIR}/level1/level2/testdata_build.txt"
COPYONLY
)
set_target_properties(test_qt_testcase_builddir PROPERTIES
QT_TESTCASE_BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/level1/level2"
)

View File

@ -0,0 +1 @@
This is the test data found in QT_TESTCASE_SOURCEDIR.

View File

@ -0,0 +1,32 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QCoreApplication>
#include <QtTest/QTest>
#include <QDebug>
class TestClass : public QObject
{
Q_OBJECT
public:
TestClass(QObject *parent = nullptr) { }
private slots:
void doTest();
};
void TestClass::doTest()
{
QFile fsrc(QFINDTESTDATA("data/testdata.txt"));
QVERIFY(fsrc.open(QFile::ReadOnly));
QCOMPARE(fsrc.readAll().trimmed(),
QByteArrayLiteral("This is the test data found in QT_TESTCASE_SOURCEDIR."));
QFile fbuild(QFINDTESTDATA("level2/testdata_build.txt"));
QVERIFY(fbuild.open(QFile::ReadOnly));
QCOMPARE(fbuild.readAll().trimmed(),
QByteArrayLiteral("This is the test data found in custom QT_TESTCASE_BUILDDIR."));
}
QTEST_MAIN(TestClass)
#include "main.moc"

View File

@ -0,0 +1 @@
This is the test data found in custom QT_TESTCASE_BUILDDIR.