1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the test suite of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT |
21 | ** included in the packaging of this file. Please review the following |
22 | ** information to ensure the GNU General Public License requirements will |
23 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
24 | ** |
25 | ** $QT_END_LICENSE$ |
26 | ** |
27 | ****************************************************************************/ |
28 | #ifndef TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_FINAL_CLASSES_H |
29 | #define TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_FINAL_CLASSES_H |
30 | |
31 | #include <QtCore/QObject> |
32 | |
33 | #ifndef Q_MOC_RUN // hide from moc |
34 | # define final |
35 | # define sealed |
36 | # define EXPORT_MACRO |
37 | # define EXPORT_MACRO2(X,Y,Z) |
38 | #endif |
39 | |
40 | class FinalTestClassQt Q_DECL_FINAL : public QObject |
41 | { |
42 | Q_OBJECT |
43 | public: |
44 | explicit FinalTestClassQt(QObject *parent = 0) |
45 | : QObject(parent) {} |
46 | }; |
47 | |
48 | |
49 | class EXPORT_MACRO ExportedFinalTestClassQt Q_DECL_FINAL : public QObject |
50 | { |
51 | Q_OBJECT |
52 | public: |
53 | explicit ExportedFinalTestClassQt(QObject *parent = 0) |
54 | : QObject(parent) {} |
55 | }; |
56 | |
57 | class EXPORT_MACRO2(X,Y,Z) ExportedFinalTestClassQtX Q_DECL_FINAL : public QObject |
58 | { |
59 | Q_OBJECT |
60 | public: |
61 | explicit ExportedFinalTestClassQtX(QObject *parent = 0) |
62 | : QObject(parent) {} |
63 | }; |
64 | |
65 | class FinalTestClassCpp11 final : public QObject |
66 | { |
67 | Q_OBJECT |
68 | public: |
69 | explicit FinalTestClassCpp11(QObject *parent = 0) |
70 | : QObject(parent) {} |
71 | }; |
72 | |
73 | class EXPORT_MACRO ExportedFinalTestClassCpp11 final : public QObject |
74 | { |
75 | Q_OBJECT |
76 | public: |
77 | explicit ExportedFinalTestClassCpp11(QObject *parent = 0) |
78 | : QObject(parent) {} |
79 | }; |
80 | |
81 | class EXPORT_MACRO2(X,Y,Z) ExportedFinalTestClassCpp11X final : public QObject |
82 | { |
83 | Q_OBJECT |
84 | public: |
85 | explicit ExportedFinalTestClassCpp11X(QObject *parent = 0) |
86 | : QObject(parent) {} |
87 | }; |
88 | |
89 | class SealedTestClass sealed : public QObject |
90 | { |
91 | Q_OBJECT |
92 | public: |
93 | explicit SealedTestClass(QObject *parent = 0) |
94 | : QObject(parent) {} |
95 | }; |
96 | |
97 | class EXPORT_MACRO ExportedSealedTestClass sealed : public QObject |
98 | { |
99 | Q_OBJECT |
100 | public: |
101 | explicit ExportedSealedTestClass(QObject *parent = 0) |
102 | : QObject(parent) {} |
103 | }; |
104 | |
105 | class EXPORT_MACRO2(X,Y,Z) ExportedSealedTestClassX sealed : public QObject |
106 | { |
107 | Q_OBJECT |
108 | public: |
109 | explicit ExportedSealedTestClassX(QObject *parent = 0) |
110 | : QObject(parent) {} |
111 | }; |
112 | |
113 | #ifndef Q_MOC_RUN |
114 | # undef final |
115 | # undef sealed |
116 | # undef EXPORT_MACRO |
117 | # undef EXPORT_MACRO2 |
118 | #endif |
119 | |
120 | #endif // TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_FINAL_CLASSES_H |
121 | |