Centralize copyright information for Qt

Maintain one central place - .cmake.conf - for information
about Qt's copyright.

Pick-to: 6.2 6.5
Change-Id: Ibcbce4313eba9660d459061b0ad00307e267b8f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Kai Köhne 2023-03-14 13:31:39 +01:00
parent 70bc5dcb75
commit 003b084f38
9 changed files with 19 additions and 5 deletions

View File

@ -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")

View File

@ -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"

View File

@ -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}"

View File

@ -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)

View File

@ -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;

View File

@ -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"

View File

@ -23,5 +23,6 @@ qt_internal_add_tool(${target_name}
QT_NO_FOREACH
LIBRARIES
Qt::Core
Qt::CorePrivate
)
qt_internal_return_unless_building_tools()

View File

@ -10,6 +10,7 @@
#include <QtCore/qtextstream.h>
#include <QtCore/qfile.h>
#include <QtCore/qmap.h>
#include <QtCore/private/qconfig_p.h>
#include <iterator>
@ -42,7 +43,7 @@ void generateList(const QList<int> &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;
}

View File

@ -1921,7 +1921,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
"<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
"<p>Qt is The Qt Company Ltd product developed as an open source "
"project. See <a href=\"http://%3/\">%3</a> for more information.</p>"
).arg(QStringLiteral("2023"),
).arg(QLatin1String(QT_COPYRIGHT_YEAR),
QStringLiteral("qt.io/licensing"),
QStringLiteral("qt.io"));
QMessageBox *msgBox = new QMessageBox(parent);