diff --git a/.cmake.conf b/.cmake.conf index f183bf6337..88b287c77e 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -10,6 +10,9 @@ endif() set(QT_REPO_MODULE_VERSION "6.6.0") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") +set(QT_COPYRIGHT_YEAR "2023") +set(QT_COPYRIGHT "Copyright (C) ${QT_COPYRIGHT_YEAR} The Qt Company Ltd and other contributors.") + # Minimum requirement for building Qt set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_SHARED "3.16") set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_QT_STATIC "3.21") diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index 75dab98106..83bcabe49b 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -732,6 +732,12 @@ set(OpenGL_GL_PREFERENCE \"${OpenGL_GL_PREFERENCE}\" CACHE STRING \"\") ") endif() + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + " +set(QT_COPYRIGHT_YEAR \"${QT_COPYRIGHT_YEAR}\" CACHE STRING \"\") +set(QT_COPYRIGHT \"${QT_COPYRIGHT}\" CACHE STRING \"\") +") + qt_compute_relative_path_from_cmake_config_dir_to_prefix() configure_file( "${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsExtra.cmake.in" diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake index 43acde59f1..0223712a5b 100644 --- a/cmake/QtTargetHelpers.cmake +++ b/cmake/QtTargetHelpers.cmake @@ -326,7 +326,7 @@ function(qt_set_target_info_properties target) set(arg_TARGET_COMPANY "The Qt Company Ltd.") endif() if("${arg_TARGET_COPYRIGHT}" STREQUAL "") - set(arg_TARGET_COPYRIGHT "Copyright (C) 2023 The Qt Company Ltd.") + set(arg_TARGET_COPYRIGHT "${QT_COPYRIGHT}") endif() set_target_properties(${target} PROPERTIES QT_TARGET_VERSION "${arg_TARGET_VERSION}" diff --git a/configure.cmake b/configure.cmake index 4b3e6ff6d4..c32338e0ad 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1332,3 +1332,6 @@ qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC) qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC) qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC) qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC) + +qt_extra_definition("QT_COPYRIGHT" \"${QT_COPYRIGHT}\" PRIVATE) +qt_extra_definition("QT_COPYRIGHT_YEAR" \"${QT_COPYRIGHT_YEAR}\" PRIVATE) diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp index 96833cbe1a..1a45685515 100644 --- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp +++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp @@ -37,7 +37,7 @@ static const char docTypeHeader[] = #define PROGRAMNAME "qdbuscpp2xml" #define PROGRAMVERSION "0.2" -#define PROGRAMCOPYRIGHT "Copyright (C) 2023 The Qt Company Ltd." +#define PROGRAMCOPYRIGHT QT_COPYRIGHT static QString outputFile; static int flags; diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp index 3d1e7c320d..76ed60402b 100644 --- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp +++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp @@ -21,7 +21,7 @@ #define PROGRAMNAME "qdbusxml2cpp" #define PROGRAMVERSION "0.8" -#define PROGRAMCOPYRIGHT "Copyright (C) 2023 The Qt Company Ltd." +#define PROGRAMCOPYRIGHT QT_COPYRIGHT #define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply" diff --git a/src/tools/qlalr/CMakeLists.txt b/src/tools/qlalr/CMakeLists.txt index 003b46417a..f6e2077ef4 100644 --- a/src/tools/qlalr/CMakeLists.txt +++ b/src/tools/qlalr/CMakeLists.txt @@ -23,5 +23,6 @@ qt_internal_add_tool(${target_name} QT_NO_FOREACH LIBRARIES Qt::Core + Qt::CorePrivate ) qt_internal_return_unless_building_tools() diff --git a/src/tools/qlalr/cppgenerator.cpp b/src/tools/qlalr/cppgenerator.cpp index 51e151b4fb..3c4264737e 100644 --- a/src/tools/qlalr/cppgenerator.cpp +++ b/src/tools/qlalr/cppgenerator.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -42,7 +43,7 @@ void generateList(const QList &list, QTextStream &out) QString CppGenerator::copyrightHeader() const { return - "// Copyright (C) 2016 The Qt Company Ltd.\n" + "// " QT_COPYRIGHT "\n" "// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0\n" "\n"_L1; } diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 4ae86a2839..cb985ff145 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1921,7 +1921,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) "

Qt and the Qt logo are trademarks of The Qt Company Ltd.

" "

Qt is The Qt Company Ltd product developed as an open source " "project. See %3 for more information.

" - ).arg(QStringLiteral("2023"), + ).arg(QLatin1String(QT_COPYRIGHT_YEAR), QStringLiteral("qt.io/licensing"), QStringLiteral("qt.io")); QMessageBox *msgBox = new QMessageBox(parent);