remove tests

This commit is contained in:
kleuter 2023-11-17 12:00:54 +01:00
parent c52a8888af
commit db6500c186
11084 changed files with 0 additions and 2396040 deletions

View File

@ -1,22 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
if(QT_BUILD_STANDALONE_TESTS)
# Add qt_find_package calls for extra dependencies that need to be found when building
# the standalone tests here.
# Needed for early feature values, despite it being found later on in qt_build_tests().
# Needs to be find_package, not qt_find_package, because qt_find_package doesn't handle finding
# component for a super-package that has already been found.
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Core)
# Modify the optimization flags specifically for qtbase standalone tests. Other projects
# are handled by qt_enable_cmake_languages().
qt_internal_set_up_config_optimizations_like_in_qmake()
qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1)
qt_find_package(ICU 50.1 COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data)
qt_find_package(WrapOpenSSL PROVIDED_TARGETS WrapOpenSSL::WrapOpenSSL)
qt_find_package(WrapOpenSSLHeaders PROVIDED_TARGETS WrapOpenSSLHeaders::WrapOpenSSLHeaders)
endif()
qt_build_tests()

View File

@ -1,18 +0,0 @@
This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.
Linux X11:
* The user must be logged in to an active desktop; you can't run the
autotests without a valid DISPLAY that allows X11 connections.
* The tests are run against a KDE3 or KDE4 desktop.
* Window manager uses "click to focus", and not "focus follows mouse". Many
tests move the mouse cursor around and expect this to not affect focus
and activation.
* Disable "click to activate", i.e., when a window is opened, the window
manager should automatically activate it (give it input focus) and not
wait for the user to click the window.

View File

@ -1,110 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
# Order by dependency [*], then alphabetic. [*] If bugs in part A of
# our source would break tests of part B, then test A before B.
set(run_dbus_tests OFF)
if (QT_FEATURE_dbus)
set(run_dbus_tests ON)
if(NOT CMAKE_CROSSCOMPILING AND TARGET Qt::DBus)
execute_process(COMMAND dbus-send --session --type=signal / local.AutotestCheck.Hello
TIMEOUT 5
RESULT_VARIABLE dbus_session_test
OUTPUT_QUIET ERROR_QUIET)
if(NOT "${dbus_session_test}" STREQUAL "0")
set(run_dbus_tests OFF)
if(QT_FEATURE_dbus_linked)
message(WARNING
" QtDBus is enabled but session bus is not available for testing.\n"
" Please check the installation. Skipping QtDBus tests.")
else()
message(WARNING
" QtDBus is enabled with runtime support, but session bus is not available.\n"
" Skipping QtDBus tests.")
endif()
endif()
endif()
endif()
if(UIKIT)
# For now, only build CMake auto tests when QT_BUILD_MINIMAL_STATIC_TEST
# is a requested (which is basically what CI will build).
# The reason is that qt_internal_add_test doesn't use qt_add_executable
# at the moment, which means none of the required iOS specific finalizers
# are run.
if(QT_BUILD_MINIMAL_STATIC_TESTS)
add_subdirectory(cmake)
return()
endif()
# Build only corelib and gui tests when targeting uikit (iOS),
# because the script can't handle the SUBDIRS assignment well.
add_subdirectory(corelib)
if (TARGET Qt::Gui)
add_subdirectory(gui)
endif()
return()
endif()
# Limit set of tests to run for Android multi-ABI Qt builds.
if(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS)
add_subdirectory(cmake)
add_subdirectory(corelib/kernel/qmath)
add_subdirectory(widgets/effects/qpixmapfilter)
add_subdirectory(corelib/platform)
return()
endif()
# Only configure a single auto test for wasm for now
# Since the linking step at this point is prohibitively long (static linking)
if(WASM)
add_subdirectory(corelib/text/qchar)
return()
endif()
add_subdirectory(testlib)
if(NOT CMAKE_CROSSCOMPILING AND QT_FEATURE_process)
add_subdirectory(tools)
endif()
add_subdirectory(corelib)
if (TARGET Qt::Xml AND TARGET Qt::Sql AND TARGET Qt::Network)
add_subdirectory(cmake)
endif()
# Limit set of tests to run for static Qt builds.
if(QT_BUILD_MINIMAL_STATIC_TESTS)
return()
endif()
if (TARGET Qt::Concurrent)
add_subdirectory(concurrent)
endif()
if(run_dbus_tests)
add_subdirectory(dbus)
endif()
if (TARGET Qt::Gui)
add_subdirectory(gui)
endif()
if (TARGET Qt::Network)
add_subdirectory(network)
endif()
if (TARGET Qt::OpenGL)
add_subdirectory(opengl)
endif()
if (TARGET Qt::PrintSupport)
add_subdirectory(printsupport)
endif()
if (TARGET Qt::Sql)
add_subdirectory(sql)
endif()
if (TARGET Qt::Widgets)
add_subdirectory(widgets)
endif()
if (TARGET Qt::Xml)
add_subdirectory(xml)
endif()
# add_subdirectory(installed_cmake) ## FIXME: Does this still make sense in this form?
add_subdirectory(other)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,390 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
# This is an automatic test for the CMake configuration files.
# To run it manually,
# 1) mkdir build # Create a build directory
# 2) cd build
# 3) # Run cmake on this directory
# `$qt_prefix/bin/qt-cmake ..` or `cmake -DCMAKE_PREFIX_PATH=/path/to/qt ..`
# 4) ctest # Run ctest
# 5) ctest -V -R test_wrap_cpp_options # Run single test
#
# The expected output is something like:
#
# Start 1: test_use_modules_function
# 1/11 Test #1: test_use_modules_function ........ Passed 3.36 sec
# Start 2: test_wrap_cpp_and_resources
# 2/11 Test #2: test_wrap_cpp_and_resources ...... Passed 1.41 sec
# Start 3: test_dependent_modules
# 3/11 Test #3: test_dependent_modules ........... Passed 2.22 sec
# Start 4: test_add_resource_options
# 4/11 Test #4: test_add_resource_options ........ Passed 0.16 sec
# Start 5: test_wrap_cpp_options
# 5/11 Test #5: test_wrap_cpp_options ............ Passed 0.36 sec
# Start 6: test_needsquoting_dirname
# 6/11 Test #6: test_needsquoting_dirname ........ Passed 2.20 sec
# Start 7: test_platform_defs_include
# 7/11 Test #7: test_platform_defs_include ....... Passed 0.28 sec
# Start 8: test_qtmainwin_library
# 8/11 Test #8: test_qtmainwin_library ........... Passed 1.27 sec
# Start 9: test_dbus_module
# 9/11 Test #9: test_dbus_module ................. Passed 3.46 sec
# Start 10: test_multiple_find_package
# 10/11 Test #10: test_multiple_find_package ....... Passed 0.07 sec
# Start 11: test_add_resources_delayed_file
# 11/11 Test #11: test_add_resources_delayed_file .. Passed 0.38 sec
#
#
# Note that if Qt is not installed, or if it is installed to a
# non-standard prefix, the environment variable CMAKE_PREFIX_PATH
# needs to be set to the installation prefix or build prefix of Qt
# before running these tests.
cmake_minimum_required(VERSION 3.16)
project(cmake_usage_tests)
include(GNUInstallDirs)
# Building the CMake tests as part of a Qt prefix build + in-tree tests, currently doesn't work.
# Each CMake test will fail with a message like
#
# CMake Error at qtbase/lib/cmake/Qt6/Qt6Config.cmake:33 (include):
# include could not find load file:
# qtbase/lib/cmake/Qt6/Qt6Targets.cmake
#
# That's because the Qt packages are not installed, and we try to load the Config files from the
# build dir, but they can't work in a prefix build without installation.
# Configuring the tests as standalone tests or as a separate project works fine.
# Configuring the tests in-tree also works fine in a non-prefix build.
if(QT_REPO_MODULE_VERSION AND NOT QT_BUILD_STANDALONE_TESTS AND QT_WILL_INSTALL)
message(WARNING
"Skipping building CMake build tests because they don't work in a prefix in-tree config")
endif()
enable_testing()
# Most of the tests fail to build on Boot2qt / qemu with undefined references to QtDBus because
# it's a private dependency of QtGui, and CMake for some reason doesn't generate an -rpath-link
# flag. Notably -rpath is specified which should implicitly enable -rpath-link, but that
# doesn't seem to be the case.
# Until this is figured out, disable the tests when cross-compiling to Linux.
if(UNIX AND NOT APPLE AND NOT WIN32 AND CMAKE_CROSSCOMPILING AND NOT QT_ENABLE_CMAKE_BOOT2QT_TESTS
AND NOT QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS)
message(STATUS "Running CMake tests is disabled when cross-compiling to Linux / Boot2Qt.")
return()
endif()
set(required_packages Core Network Xml Sql Test)
set(optional_packages DBus Gui Widgets PrintSupport OpenGL Concurrent)
# Setup the test when called as a completely standalone project.
if(TARGET Qt6::Core)
# Tests are built as part of the qtbase build tree.
# Setup paths so that the Qt packages are found, similar to examples.
qt_internal_set_up_build_dir_package_paths()
endif()
find_package(Qt6 REQUIRED COMPONENTS ${required_packages})
find_package(Qt6 OPTIONAL_COMPONENTS ${optional_packages})
# Setup common test variables which were previously set by ctest_testcase_common.prf.
set(CMAKE_MODULES_UNDER_TEST "${required_packages}" ${optional_packages})
foreach(qt_package ${CMAKE_MODULES_UNDER_TEST})
set(package_name "${QT_CMAKE_EXPORT_NAMESPACE}${qt_package}")
if(${package_name}_FOUND)
set(CMAKE_${qt_package}_MODULE_MAJOR_VERSION "${${package_name}_VERSION_MAJOR}")
set(CMAKE_${qt_package}_MODULE_MINOR_VERSION "${${package_name}_VERSION_MINOR}")
set(CMAKE_${qt_package}_MODULE_PATCH_VERSION "${${package_name}_VERSION_PATCH}")
endif()
endforeach()
# Qt6CTestMacros.cmake also expects some of these variables to be set.
if(NOT TARGET Qt::Gui)
set(NO_GUI TRUE)
endif()
if(NOT TARGET Qt::DBus)
set(NO_DBUS TRUE)
endif()
if(NOT TARGET Qt::Widgets)
set(NO_WIDGETS TRUE)
endif()
include("${_Qt6CTestMacros}")
# Test only multi-abi specific functionality when QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS is ON.
# Qt::Gui is the prerequisite for all Android tests.
if(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS AND NOT NO_GUI)
unset(multi_abi_vars)
foreach(abi IN LISTS QT_ANDROID_ABIS)
list(APPEND multi_abi_vars "-DQT_PATH_ANDROID_ABI_${abi}=${QT_PATH_ANDROID_ABI_${abi}}")
endforeach()
if(QT_ANDROID_BUILD_ALL_ABIS)
list(APPEND multi_abi_vars "-DQT_ANDROID_BUILD_ALL_ABIS=${QT_ANDROID_BUILD_ALL_ABIS}")
endif()
list(APPEND multi_abi_vars "-DQT_HOST_PATH=${QT_HOST_PATH}")
set(multi_abi_forward_vars
TEST_SINGLE_VALUE_ARG
TEST_SPACES_VALUE_ARG
TEST_LIST_VALUE_ARG
TEST_ESCAPING_VALUE_ARG
)
string(REPLACE ";" "[[;]]" multi_abi_forward_vars "${multi_abi_forward_vars}")
set(single_value "TestValue")
set(list_value "TestValue[[;]]TestValue2[[;]]TestValue3")
set(escaping_value "TestValue\\\\[[;]]TestValue2\\\\[[;]]TestValue3")
set(spaces_value "TestValue TestValue2 TestValue3")
_qt_internal_test_expect_pass(test_android_multi_abi_forward_vars
BUILD_OPTIONS
${multi_abi_vars}
"-DQT_ANDROID_MULTI_ABI_FORWARD_VARS=${multi_abi_forward_vars}"
"-DTEST_SINGLE_VALUE_ARG=${single_value}"
"-DTEST_LIST_VALUE_ARG=${list_value}"
"-DTEST_ESCAPING_VALUE_ARG=${escaping_value}"
"-DTEST_SPACES_VALUE_ARG=${spaces_value}"
)
return()
endif()
if(NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_build_simple_widget_app)
set(extra_widget_app_options "")
if(IOS)
list(APPEND extra_widget_app_options
QMAKE_OPTIONS CONFIG+=iossimulator
)
endif()
if(CMAKE_HOST_WIN32)
# Unset MAKEFLAGS environment variable when invoking build tool, it might
# have options incompatible with nmake.
list(APPEND extra_widget_app_options
BUILD_ENVIRONMENT MAKEFLAGS ""
)
endif()
_qt_internal_add_qmake_test(test_build_simple_widget_app
TESTNAME test_build_simple_widget_app_qmake
${extra_widget_app_options}
)
endif()
# We only support a limited subset of cmake tests when targeting iOS:
# - Only those that use qt_add_executable (but not add_executable)
# - and don't try to run the built binaries via BINARY_ARGS option
# - and don't use internal API like qt_internal_add_*
#
# So we can't run binaries in the simulator or on-device, but we at least
# want build coverage (app linking succeeds).
if(IOS)
return()
endif()
set(is_qt_build_platform TRUE)
# macOS versions less than 10.15 are not supported for building Qt.
if(CMAKE_HOST_APPLE AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS "19.0.0")
set(is_qt_build_platform FALSE)
endif()
_qt_internal_test_expect_pass(test_umbrella_config)
_qt_internal_test_expect_pass(test_wrap_cpp_and_resources)
if (NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_dependent_modules)
_qt_internal_test_expect_pass("test(needsquoting)dirname")
endif()
_qt_internal_test_expect_pass(test_add_resource_prefix BINARY test_add_resource_prefix)
_qt_internal_test_expect_build_fail(test_add_resource_options)
_qt_internal_test_expect_build_fail(test_wrap_cpp_options)
_qt_internal_test_expect_pass(test_platform_defs_include)
_qt_internal_test_expect_pass(test_qtmainwin_library)
if (CMAKE_GENERATOR STREQUAL Ninja AND UNIX AND NOT WIN32)
_qt_internal_test_expect_pass(test_QFINDTESTDATA
BINARY "tests/test_QFINDTESTDATA"
SIMULATE_IN_SOURCE
)
# TODO: Decide if there's a reason to keep this test. With CMake 3.21.0 which passes absolute
# source file paths to the compiler (instead of relative ones), specifying a custom
# QT_TESTCASE_BUILDDIR is a no-op, which fails the test's preconditions.
# See QTBUG-95268.
#_qt_internal_test_expect_pass(test_QT_TESTCASE_BUILDDIR
# BINARY "test_qt_testcase_builddir"
# SIMULATE_IN_SOURCE
#)
endif()
if (NOT NO_DBUS)
_qt_internal_test_expect_pass(test_dbus_module)
endif()
_qt_internal_test_expect_pass(test_multiple_find_package)
_qt_internal_test_expect_pass(test_add_resources_delayed_file)
_qt_internal_test_expect_pass(test_add_binary_resources_delayed_file BINARY test_add_binary_resources_delayed_file)
_qt_internal_test_expect_pass(test_qt_add_resources_rebuild)
if(NOT NO_GUI)
_qt_internal_test_expect_pass(test_private_includes)
_qt_internal_test_expect_pass(test_private_targets)
endif()
_qt_internal_test_expect_pass(test_testlib_definitions)
_qt_internal_test_expect_pass(test_json_plugin_includes)
if(NOT NO_GUI)
_qt_internal_test_expect_build_fail(test_testlib_no_link_gui)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_gui/test_testlib_no_link_gui/"
)
endif()
if (NOT NO_WIDGETS)
_qt_internal_test_expect_build_fail(test_testlib_no_link_widgets)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_widgets/test_testlib_no_link_widgets/"
)
endif()
set(qt_module_includes
Core QObject
Network QHostInfo
Sql QSqlError
Test QTestEventList
Xml QDomDocument
)
if (NOT NO_GUI)
list(APPEND qt_module_includes
Gui QImage
)
endif()
if (NOT NO_WIDGETS)
list(APPEND qt_module_includes
Widgets QWidget
OpenGL QOpenGLBuffer
PrintSupport QPrinter
)
endif()
if (NOT NO_DBUS)
list(APPEND qt_module_includes
DBus QDBusMessage
)
endif()
_qt_internal_test_module_includes(
${qt_module_includes}
)
_qt_internal_test_expect_pass(test_concurrent_module)
if(NOT NO_GUI)
_qt_internal_test_expect_pass(test_opengl_lib)
endif()
if (NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_interface)
endif()
if(NOT NO_GUI)
_qt_internal_test_expect_pass(test_interface_link_libraries)
endif()
_qt_internal_test_expect_pass(test_moc_macro_target)
# The modification of TARGET_OBJECTS needs the following change in cmake
# https://gitlab.kitware.com/cmake/cmake/commit/93c89bc75ceee599ba7c08b8fe1ac5104942054f
_qt_internal_test_expect_pass(test_add_big_resource)
# With earlier CMake versions, this test would simply run moc multiple times and lead to:
# /usr/bin/ld: error: CMakeFiles/mywidget.dir/mywidget_automoc.cpp.o: multiple definition of 'MyWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'
# /usr/bin/ld: CMakeFiles/mywidget.dir/moc_mywidget.cpp.o: previous definition here
# Reason: SKIP_* properties were added in CMake 3.8 only
if(NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_QTBUG-63422)
endif()
# Find main Qt installation location and bin dir.
if(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX)
set(qt_install_prefix "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
elseif(QT6_INSTALL_PREFIX)
set(qt_install_prefix "${QT6_INSTALL_PREFIX}")
endif()
if(INSTALL_LIBEXECDIR)
set(qt_install_libexec_dir "${INSTALL_LIBEXECDIR}")
elseif(QT6_INSTALL_LIBEXECS)
set(qt_install_libexec_dir "${QT6_INSTALL_LIBEXECS}")
endif()
# Test building and installing a few dummy Qt modules and plugins.
if(is_qt_build_platform)
set(mockplugins_test_args "")
if(NOT QT_FEATURE_no_prefix)
list(APPEND mockplugins_test_args
BINARY "${CMAKE_COMMAND}"
BINARY_ARGS
"-DQT_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mockplugins"
-P "${qt_install_prefix}/${qt_install_libexec_dir}/qt-cmake-private-install.cmake"
)
endif()
_qt_internal_test_expect_pass(mockplugins ${mockplugins_test_args})
set_tests_properties(mockplugins PROPERTIES FIXTURES_SETUP build_mockplugins)
# Test importing the plugins built in the project above.
_qt_internal_test_expect_pass(test_import_plugins BINARY ${CMAKE_CTEST_COMMAND} BINARY_ARGS -V)
set_tests_properties(test_import_plugins PROPERTIES FIXTURES_REQUIRED build_mockplugins)
endif()
_qt_internal_test_expect_pass(test_versionless_targets)
if(NOT NO_GUI)
_qt_internal_test_expect_pass(test_global_promotion)
endif()
_qt_internal_test_expect_pass(test_add_resources_binary_generated
BINARY test_add_resources_binary_generated)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17")
_qt_internal_test_expect_pass(test_add_resources_big_resources
BINARY test_add_resources_big_resources)
endif()
include(test_plugin_shared_static_flavor.cmake)
_qt_internal_test_expect_pass(tst_qaddpreroutine
BINARY tst_qaddpreroutine)
if(is_qt_build_platform)
_qt_internal_test_expect_pass(test_static_resources
BINARY "${CMAKE_CTEST_COMMAND}"
BINARY_ARGS "-V")
_qt_internal_test_expect_pass(test_generating_cpp_exports)
endif()
_qt_internal_test_expect_pass(test_qt_extract_metatypes)
set(deploy_args
test_widgets_app_deployment
BINARY "${CMAKE_CTEST_COMMAND}"
BINARY_ARGS "-V"
# Need to explicitly specify a writable install prefix.
BUILD_OPTIONS
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/test_widgets_app_deployment_installed
NO_RUN_ENVIRONMENT_PLUGIN_PATH
)
set(is_desktop_linux FALSE)
if(UNIX AND NOT APPLE AND NOT ANDROID AND NOT CMAKE_CROSSCOMPILING)
set(is_desktop_linux TRUE)
endif()
# For now, the test should only pass on Windows, macOS and desktop Linux shared and static builds
# and fail on other platforms, because there is no support for runtime dependency deployment on
# those platforms.
# With static builds the runtime dependencies are just skipped, but the test should still pass.
if(WIN32 OR (APPLE AND NOT IOS) OR is_desktop_linux)
_qt_internal_test_expect_pass(${deploy_args})
else()
_qt_internal_test_expect_fail(${deploy_args})
endif()

View File

@ -1 +0,0 @@
set(QT_REPO_MODULE_VERSION "6.6.0")

View File

@ -1,32 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
project(QtMockPlugins
VERSION "${QT_REPO_MODULE_VERSION}"
DESCRIPTION "Qt MockPlugins Libraries"
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX C
)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
qt_internal_project_setup()
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Widgets Xml)
qt_build_repo_begin()
add_subdirectory(mockplugins1)
add_subdirectory(mockplugins2)
add_subdirectory(mockplugins3)
add_subdirectory(mock1plugin)
add_subdirectory(mock2plugin)
add_subdirectory(mock3plugin)
add_subdirectory(mock4plugin)
add_subdirectory(mock5plugin)
add_subdirectory(mock6plugin)
qt_build_repo_end()

View File

@ -1,13 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_plugin(QMock1Plugin
NO_UNITY_BUILD
CLASS_NAME QMock1Plugin
PLUGIN_TYPE mockplugin
SOURCES
qmock1plugin.cpp qmock1plugin.h
LIBRARIES
Qt::Core
Qt::MockPlugins1
)

View File

@ -1,10 +0,0 @@
#include "qmock1plugin.h"
QT_BEGIN_NAMESPACE
QString QMock1Plugin::pluginName() const
{
return "QMock1Plugin";
}
QT_END_NAMESPACE

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCK1PLUGIN_H
#define QMOCK1PLUGIN_H
#include <QObject>
#include <QtMockPlugins1/QMockPlugin>
QT_BEGIN_NAMESPACE
class QMock1Plugin : public QObject, public QMockPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock1plugin.json")
Q_INTERFACES(QMockPlugin)
public:
QString pluginName() const override;
};
QT_END_NAMESPACE
#endif // QMOCK1PLUGIN_H

View File

@ -1,13 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_plugin(QMock2Plugin
NO_UNITY_BUILD
CLASS_NAME QMock2Plugin
PLUGIN_TYPE mockplugin
SOURCES
qmock2plugin.cpp qmock2plugin.h
LIBRARIES
Qt::Core
Qt::MockPlugins1
)

View File

@ -1,10 +0,0 @@
#include "qmock2plugin.h"
QT_BEGIN_NAMESPACE
QString QMock2Plugin::pluginName() const
{
return "QMock2Plugin";
}
QT_END_NAMESPACE

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCK2PLUGIN_H
#define QMOCK2PLUGIN_H
#include <QObject>
#include <QtMockPlugins1/QMockPlugin>
QT_BEGIN_NAMESPACE
class QMock2Plugin : public QObject, public QMockPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock2plugin.json")
Q_INTERFACES(QMockPlugin)
public:
QString pluginName() const override;
};
QT_END_NAMESPACE
#endif // QMOCK2PLUGIN_H

View File

@ -1,13 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_plugin(QMock3Plugin
NO_UNITY_BUILD
CLASS_NAME QMock3Plugin
PLUGIN_TYPE mockplugin
SOURCES
qmock3plugin.cpp qmock3plugin.h
LIBRARIES
Qt::Core
Qt::MockPlugins1
)

View File

@ -1,10 +0,0 @@
#include "qmock3plugin.h"
QT_BEGIN_NAMESPACE
QString QMock3Plugin::pluginName() const
{
return "QMock3Plugin";
}
QT_END_NAMESPACE

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCK3PLUGIN_H
#define QMOCK3PLUGIN_H
#include <QObject>
#include <QtMockPlugins1/QMockPlugin>
QT_BEGIN_NAMESPACE
class QMock3Plugin : public QObject, public QMockPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock3plugin.json")
Q_INTERFACES(QMockPlugin)
public:
QString pluginName() const override;
};
QT_END_NAMESPACE
#endif // QMOCK3PLUGIN_H

View File

@ -1,14 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_plugin(QMock4Plugin
NO_UNITY_BUILD
CLASS_NAME QMock4Plugin
PLUGIN_TYPE mockplugin
DEFAULT_IF FALSE
SOURCES
qmock4plugin.cpp qmock4plugin.h
LIBRARIES
Qt::Core
Qt::MockPlugins1
)

View File

@ -1,10 +0,0 @@
#include "qmock4plugin.h"
QT_BEGIN_NAMESPACE
QString QMock4Plugin::pluginName() const
{
return "QMock4Plugin";
}
QT_END_NAMESPACE

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCK4PLUGIN_H
#define QMOCK4PLUGIN_H
#include <QObject>
#include <QtMockPlugins1/QMockPlugin>
QT_BEGIN_NAMESPACE
class QMock4Plugin : public QObject, public QMockPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock4plugin.json")
Q_INTERFACES(QMockPlugin)
public:
QString pluginName() const override;
};
QT_END_NAMESPACE
#endif // QMOCK4PLUGIN_H

View File

@ -1,14 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_plugin(QMock5Plugin
NO_UNITY_BUILD
CLASS_NAME QMock5Plugin
PLUGIN_TYPE mockplugin
DEFAULT_IF FALSE
SOURCES
qmock5plugin.cpp qmock5plugin.h
LIBRARIES
Qt::Core
Qt::MockPlugins3
)

View File

@ -1,10 +0,0 @@
#include "qmock5plugin.h"
QT_BEGIN_NAMESPACE
QString QMock5Plugin::pluginName() const
{
return "QMock5Plugin";
}
QT_END_NAMESPACE

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCK5PLUGIN_H
#define QMOCK5PLUGIN_H
#include <QObject>
#include <QtMockPlugins1/QMockPlugin>
QT_BEGIN_NAMESPACE
class QMock5Plugin : public QObject, public QMockPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QMockPlugin_iid FILE "mock5plugin.json")
Q_INTERFACES(QMockPlugin)
public:
QString pluginName() const override;
};
QT_END_NAMESPACE
#endif // QMOCK5PLUGIN_H

View File

@ -1,13 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_plugin(QMock6Plugin
NO_UNITY_BUILD
CLASS_NAME QMock6Plugin
PLUGIN_TYPE mockauxplugin
SOURCES
qmock6plugin.cpp qmock6plugin.h
LIBRARIES
Qt::Core
Qt::MockPlugins3
)

View File

@ -1,10 +0,0 @@
#include "qmock6plugin.h"
QT_BEGIN_NAMESPACE
QString QMock6Plugin::pluginName() const
{
return "QMock6Plugin";
}
QT_END_NAMESPACE

View File

@ -1,23 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCK6PLUGIN_H
#define QMOCK6PLUGIN_H
#include <QObject>
#include <QtMockPlugins3/QMockAuxPlugin>
QT_BEGIN_NAMESPACE
class QMock6Plugin : public QObject, public QMockAuxPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QMockAuxPlugin_iid FILE "mock6plugin.json")
Q_INTERFACES(QMockAuxPlugin)
public:
QString pluginName() const override;
};
QT_END_NAMESPACE
#endif // QMOCK6PLUGIN_H

View File

@ -1,14 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_module(MockPlugins1
NO_UNITY_BUILD
PLUGIN_TYPES mockplugin
SOURCES
qmockplugin.h
fake.cpp
LIBRARIES
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
)

View File

@ -1,2 +0,0 @@
# This is needed so that MODULE_PLUGIN_TYPES property is set on the exported target.
# Fun times.

View File

@ -1,9 +0,0 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QtGlobal>
// Empty exported function needed to create .lib on Windows.
Q_DECL_EXPORT void mockplugins1_foo() {
}

View File

@ -1,25 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCKPLUGIN_H
#define QMOCKPLUGIN_H
#include <QtCore/QString>
#include <QtCore/QtPlugin>
QT_BEGIN_NAMESPACE
#define QMockPlugin_iid "org.qt-project.Qt.Tests.QMockPlugin"
class QMockPlugin
{
public:
virtual ~QMockPlugin() {}
virtual QString pluginName() const = 0;
};
Q_DECLARE_INTERFACE(QMockPlugin, QMockPlugin_iid)
QT_END_NAMESPACE
#endif // QMOCKPLUGIN_H

View File

@ -1,12 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_module(MockPlugins2
NO_UNITY_BUILD
SOURCES
fake.cpp
LIBRARIES
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
)

View File

@ -1,9 +0,0 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QtGlobal>
// Empty exported function needed to create .lib on Windows.
Q_DECL_EXPORT void mockplugins2_foo() {
}

View File

@ -1,14 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_internal_add_module(MockPlugins3
NO_UNITY_BUILD
PLUGIN_TYPES mockauxplugin
SOURCES
qmockauxplugin.h
fake.cpp
LIBRARIES
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
)

View File

@ -1,2 +0,0 @@
# This is needed so that MODULE_PLUGIN_TYPES property is set on the exported target.
# Fun times.

View File

@ -1,9 +0,0 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QtGlobal>
// Empty exported function needed to create .lib on Windows.
Q_DECL_EXPORT void mockplugins3_foo() {
}

View File

@ -1,25 +0,0 @@
// Copyright (C) 2018 Kitware, Inc.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef QMOCKAUXPLUGIN_H
#define QMOCKAUXPLUGIN_H
#include <QtCore/QString>
#include <QtCore/QtPlugin>
QT_BEGIN_NAMESPACE
#define QMockAuxPlugin_iid "org.qt-project.Qt.Tests.QMockAuxPlugin"
class QMockAuxPlugin
{
public:
virtual ~QMockAuxPlugin() {}
virtual QString pluginName() const = 0;
};
Q_DECLARE_INTERFACE(QMockAuxPlugin, QMockAuxPlugin_iid)
QT_END_NAMESPACE
#endif // QMOCKAUXPLUGIN_H

View File

@ -1,18 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project("test(needsquoting)dirname")
find_package(Qt6Widgets REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
qt_wrap_cpp(moc_files mywidget.h)
qt_wrap_ui(ui_files mywidget.ui)
add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files})
target_link_libraries(mywidget Qt::Widgets)

View File

@ -1,18 +0,0 @@
// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "mywidget.h"
#include "ui_mywidget.h"
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
{
emit someSignal();
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
MyWidget myWidget;
return 0;
}

View File

@ -1,27 +0,0 @@
// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef MYWIDGET_H
#define MYWIDGET_H
#include <QWidget>
namespace Ui
{
class MyWidget;
}
class MyWidget : public QWidget
{
Q_OBJECT
public:
MyWidget(QWidget *parent = nullptr);
signals:
void someSignal();
private:
Ui::MyWidget *ui;
};
#endif

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>PushButton</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item>
<widget class="QTextEdit" name="textEdit"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,14 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(test_QFINDTESTDATA)
find_package(Qt6Test REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_subdirectory(tests)

View File

@ -1,7 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
add_executable(test_QFINDTESTDATA WIN32 main.cpp)
target_link_libraries(test_QFINDTESTDATA Qt::Test)

View File

@ -1,25 +0,0 @@
// Copyright (C) 2016 Stephen Kelly <steveire@gmail,com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QCoreApplication>
#include <QtTest/QTest>
class TestClass : public QObject
{
Q_OBJECT
public:
TestClass(QObject* parent = nullptr) {}
private slots:
void doTest();
};
void TestClass::doTest()
{
QFile f(QFINDTESTDATA("testdata.txt"));
QVERIFY(f.open(QFile::ReadOnly));
QCOMPARE(f.readAll().trimmed(), QByteArrayLiteral("This is a test."));
}
QTEST_MAIN(TestClass)
#include "main.moc"

View File

@ -1 +0,0 @@
This is a test.

View File

@ -1,37 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
if(POLICY CMP0099)
cmake_policy(SET CMP0099 NEW) # Avoid CMP0099 related warnings.
endif()
project(test_dependent_modules)
find_package(Qt6Widgets REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# make sure CMP0071 warnings cause a test failure
set(CMAKE_SUPPRESS_DEVELOPER_ERRORS FALSE CACHE INTERNAL "" FORCE)
qt_wrap_cpp(moc_files mywidget.h)
qt_wrap_ui(ui_files mywidget.ui)
qt_add_resources(qrc_files res.qrc)
add_executable(mywidget
# source files
mywidget.cpp
mywidget.h
mywidget.ui
res.qrc
# generated files
${moc_files}
${ui_files}
${qrc_files}
)
target_link_libraries(mywidget PRIVATE Qt::Widgets)

View File

@ -1,18 +0,0 @@
// Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Kevin Funk <kevin.funk@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "mywidget.h"
#include "ui_mywidget.h"
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
{
emit someSignal();
}
int main(int argc, char **argv)
{
QApplication app(argc, argv);
MyWidget myWidget;
return 0;
}

View File

@ -1,27 +0,0 @@
// Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Kevin Funk <kevin.funk@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef MYWIDGET_H
#define MYWIDGET_H
#include <QWidget>
namespace Ui
{
class MyWidget;
}
class MyWidget : public QWidget
{
Q_OBJECT
public:
MyWidget(QWidget *parent = nullptr);
signals:
void someSignal();
private:
Ui::MyWidget *ui = nullptr;
};
#endif

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>PushButton</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item>
<widget class="QTextEdit" name="textEdit"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,4 +0,0 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
</qresource>
</RCC>

View File

@ -1,23 +0,0 @@
# 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

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

View File

@ -1,32 +0,0 @@
// 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

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

View File

@ -1,19 +0,0 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(test_add_big_resource)
# Make sure that AUTOMOC does not interfere with qt_add_big_resources
set(CMAKE_AUTOMOC ON)
find_package(Qt6Core REQUIRED)
qt_wrap_cpp(moc_files myobject.h)
qt_add_big_resources(rcc_files "test_add_big_resource.qrc" "test_add_big_resource2.qrc"
"subdir/test_add_big_resource.qrc")
add_executable(myobject myobject.cpp ${moc_files} ${rcc_files})
target_link_libraries(myobject PRIVATE Qt::Core)

View File

@ -1,19 +0,0 @@
// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "myobject.h"
MyObject::MyObject(QObject *parent)
: QObject(parent)
{
emit someSignal();
}
int main(int argc, char **argv)
{
MyObject myObject;
// Compile error if the resource file was not created.
Q_INIT_RESOURCE(test_add_big_resource);
Q_INIT_RESOURCE(test_add_big_resource2);
return 0;
}

View File

@ -1,19 +0,0 @@
// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef MYOBJECT_H
#define MYOBJECT_H
#include <QObject>
class MyObject : public QObject
{
Q_OBJECT
public:
MyObject(QObject *parent = nullptr);
signals:
void someSignal();
};
#endif

View File

@ -1 +0,0 @@
Ken sent me.

Some files were not shown because too many files have changed in this diff Show More