diff options
Diffstat (limited to 'cmake/modulecppexports.h.in')
-rw-r--r-- | cmake/modulecppexports.h.in | 73 |
1 files changed, 34 insertions, 39 deletions
diff --git a/cmake/modulecppexports.h.in b/cmake/modulecppexports.h.in index 68b0353a97..4d41a3a2a2 100644 --- a/cmake/modulecppexports.h.in +++ b/cmake/modulecppexports.h.in @@ -1,46 +1,12 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the @module@ module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef @header_base_name_upper@_H #define @header_base_name_upper@_H -#include <QtCore/qglobal.h> +#include <QtCore/qcompilerdetection.h> +#include <QtCore/qtconfigmacros.h> // Q_@module_define_infix@_EXPORT +#include <QtCore/qtdeprecationmarkers.h> // QT_IF_DEPRECATED_SINCE #if defined(QT_SHARED) || !defined(QT_STATIC) # if defined(QT_BUILD_@module_define_infix@_LIB) @@ -52,4 +18,33 @@ # define Q_@module_define_infix@_EXPORT #endif +#if !defined(QT_BUILD_@module_define_infix@_LIB) && !defined(QT_STATIC) +/* outside library -> inline decl + defi */ +/* static builds treat everything as part of the library, so they never inline */ +# define QT_@module_define_infix@_INLINE_SINCE(major, minor) inline +# define QT_@module_define_infix@_INLINE_IMPL_SINCE(major, minor) 1 +#elif defined(QT_@module_define_infix@_BUILD_REMOVED_API) +/* inside library, inside removed_api.cpp: + * keep deprecated API -> non-inline decl; + * remove deprecated API -> inline decl; + * definition is always available */ +# define QT_@module_define_infix@_INLINE_SINCE(major, minor) \ + QT_IF_DEPRECATED_SINCE(major, minor, inline, /* not inline */) +# define QT_@module_define_infix@_INLINE_IMPL_SINCE(major, minor) 1 +#else +/* inside library, outside removed_api.cpp: + * keep deprecated API -> non-inline decl, no defi; + * remove deprecated API -> inline decl, defi */ +# define QT_@module_define_infix@_INLINE_SINCE(major, minor) \ + QT_IF_DEPRECATED_SINCE(major, minor, inline, /* not inline */) +# define QT_@module_define_infix@_INLINE_IMPL_SINCE(major, minor) \ + QT_IF_DEPRECATED_SINCE(major, minor, 1, 0) +#endif + +#ifdef QT_@module_define_infix@_BUILD_REMOVED_API +# define QT_@module_define_infix@_REMOVED_SINCE(major, minor) QT_DEPRECATED_SINCE(major, minor) +#else +# define QT_@module_define_infix@_REMOVED_SINCE(major, minor) 0 +#endif + #endif // @header_base_name_upper@_H |