summaryrefslogtreecommitdiffstats
path: root/examples/corelib/tools/customtype/CMakeLists.txt
diff options
context:
space:
mode:
authorRym Bouabid <rym.bouabid@qt.io>2023-09-22 17:12:50 +0200
committerRym Bouabid <rym.bouabid@qt.io>2023-10-04 21:04:45 +0200
commitb956fec7eed57713faa5736917661280e5cec16c (patch)
treec1c7f5ed7332cdb241a6d732ee77ff19671c0a50 /examples/corelib/tools/customtype/CMakeLists.txt
parentadb7e2525e0d4db622833b6d05d6339e511c2480 (diff)
Remove Custom Type Example and Custom Type Sending Example
The whole Q_DECLARE_METATYPE part is superfluous in these two examples, as QVariant works with any type as long as it is copy-constructible. And QVariant will call the equivalent of qRegisterMetaType, so that doesn't need to happen, either. Showing how to integrate the type with qDebug is fine in theory, but also a repetition of content that can be found in other places. Given that there isn't much else being shown in these two examples, it's better to remove them from examples and move them to manual tests. Some parts of "Custom Type Example" were used as snippets in other documentations under qtbase/src/corelib. So, they were added in customtypeexample.cpp file in the snippets folder. Fixes: QTBUG-117001 Pick-to: 6.6 6.5 Change-Id: I45b16338912e3f7394cbb5169642bd31af32d5e1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples/corelib/tools/customtype/CMakeLists.txt')
-rw-r--r--examples/corelib/tools/customtype/CMakeLists.txt37
1 files changed, 0 insertions, 37 deletions
diff --git a/examples/corelib/tools/customtype/CMakeLists.txt b/examples/corelib/tools/customtype/CMakeLists.txt
deleted file mode 100644
index 21c9003f56..0000000000
--- a/examples/corelib/tools/customtype/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: BSD-3-Clause
-
-cmake_minimum_required(VERSION 3.16)
-project(customtype LANGUAGES CXX)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype")
-
-find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
-
-qt_standard_project_setup()
-
-qt_add_executable(customtype
- main.cpp
- message.cpp message.h
-)
-
-set_target_properties(customtype PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-
-target_link_libraries(customtype PRIVATE
- Qt6::Core
- Qt6::Gui
- Qt6::Widgets
-)
-
-install(TARGETS customtype
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)