summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/moc/cxx-attributes.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/moc/cxx-attributes.h')
-rw-r--r--tests/auto/tools/moc/cxx-attributes.h42
1 files changed, 14 insertions, 28 deletions
diff --git a/tests/auto/tools/moc/cxx-attributes.h b/tests/auto/tools/moc/cxx-attributes.h
index eff6a3ec41..54649b93fa 100644
--- a/tests/auto/tools/moc/cxx-attributes.h
+++ b/tests/auto/tools/moc/cxx-attributes.h
@@ -1,37 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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 General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** 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-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef CXXATTRIBUTE_H
#define CXXATTRIBUTE_H
#include <QtCore/QObject>
-class CppAttribute : public QObject
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_CLANG("-Wunknown-attributes")
+QT_WARNING_DISABLE_GCC("-Wattributes")
+
+class [[deprecated]] CppAttribute : public QObject
{
Q_OBJECT
signals:
@@ -57,6 +36,8 @@ public slots:
#endif
};
+QT_WARNING_POP
+
#ifdef Q_MOC_RUN
# define TEST_COMPILER_DEPRECATION [[deprecated]]
# define TEST_COMPILER_DEPRECATION_X(x) [[deprecated(x)]]
@@ -65,6 +46,9 @@ public slots:
# define TEST_COMPILER_DEPRECATION_X(x) Q_DECL_ENUMERATOR_DEPRECATED_X(x)
#endif
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+
namespace TestQNamespaceDeprecated {
Q_NAMESPACE
enum class TestEnum1 {
@@ -100,4 +84,6 @@ namespace TestQNamespaceDeprecated {
Q_FLAG_NS(TestFlag1)
}
+QT_WARNING_POP
+
#endif // CXXATTRIBUTE_H