1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
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
29#define QT_NO_KEYWORDS
30#undef signals
31#undef slots
32#undef emit
33#define signals FooBar
34#define slots Baz
35#define emit Yoyodyne
36
37#include <QtQuick/QtQuick>
38#include <QtQuick/private/qquickitem_p.h>
39#include <QtQuick/private/qquickflickable_p.h>
40#include <QtQuick/private/qquickitem_p.h>
41#include <QtQuick/private/qquickitemview_p.h>
42#include <QtQuick/private/qquicklistview_p.h>
43#include <QtQuick/private/qquickpainteditem_p.h>
44#include <QtQuick/private/qquickshadereffect_p.h>
45#include <QtQuick/private/qquickshadereffectsource_p.h>
46#include <QtQuick/private/qquickview_p.h>
47#include <QtQuick/private/qquickwindow_p.h>
48#include <QtQuick/private/qsgadaptationlayer_p.h>
49#include <QtQuick/private/qsgcontext_p.h>
50#include <QtQuick/private/qsgcontextplugin_p.h>
51#if QT_CONFIG(opengl)
52#include <QtQuick/private/qsgopengldistancefieldglyphcache_p.h>
53#include <QtQuick/private/qsgdefaultglyphnode_p.h>
54#include <QtQuick/private/qsgdefaultinternalimagenode_p.h>
55#include <QtQuick/private/qsgdefaultinternalrectanglenode_p.h>
56#include <QtQuick/private/qsgdepthstencilbuffer_p.h>
57#include <QtQuick/private/qsgdistancefieldglyphnode_p.h>
58#endif
59#include <QtQuick/private/qsggeometry_p.h>
60#include <QtQuick/private/qsgnode_p.h>
61#include <QtQuick/private/qsgnodeupdater_p.h>
62#include <QtQuick/private/qsgdefaultpainternode_p.h>
63#include <QtQuick/private/qsgrenderer_p.h>
64#include <QtQuick/private/qsgrenderloop_p.h>
65#include <QtQuick/private/qsgrendernode_p.h>
66#include <QtQuick/private/qsgtexturematerial_p.h>
67#include <QtQuick/private/qsgtexture_p.h>
68#include <QtQuick/private/qsgplaintexture_p.h>
69#include <QtQuick/private/qsgthreadedrenderloop_p.h>
70#include <QtQuick/private/qsgwindowsrenderloop_p.h>
71
72#include <QtQuick/private/qsgrhiatlastexture_p.h>
73#include <QtQuick/private/qsgrhidistancefieldglyphcache_p.h>
74#include <QtQuick/private/qsgrhilayer_p.h>
75#include <QtQuick/private/qsgrhishadereffectnode_p.h>
76#include <QtQuick/private/qsgrhitextureglyphcache_p.h>
77
78#undef signals
79#undef slots
80#undef emit
81
82class MyBooooooostishClass : public QObject
83{
84 Q_OBJECT
85public:
86 inline MyBooooooostishClass() {}
87
88Q_SIGNALS:
89 void mySignal();
90
91public Q_SLOTS:
92 inline void mySlot()
93 {
94 Q_UNUSED(signals);
95 Q_UNUSED(slots);
96
97 mySignal();
98 }
99
100private:
101 int signals;
102 double slots;
103};
104
105#define signals public
106#define slots
107#define emit
108#undef QT_NO_KEYWORDS
109
110#include <QtTest/QtTest>
111
112class tst_NoKeywords : public QObject
113{
114 Q_OBJECT
115};
116
117QTEST_MAIN(tst_NoKeywords)
118
119#include "tst_nokeywords.moc"
120

source code of qtdeclarative/tests/auto/quick/nokeywords/tst_nokeywords.cpp