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 | |
30 | // |
31 | // W A R N I N G |
32 | // ------------- |
33 | // |
34 | // This file is not part of the Qt API. It exists purely as an |
35 | // implementation detail. This header file may change from version to |
36 | // version without notice, or even be removed. |
37 | // |
38 | // We mean it. |
39 | |
40 | #ifndef Patternist_TestAbstractXmlReceiver_h |
41 | #define Patternist_TestAbstractXmlReceiver_h |
42 | |
43 | #include <QtXmlPatterns/QAbstractXmlReceiver> |
44 | |
45 | class TestAbstractXmlReceiver : public QAbstractXmlReceiver |
46 | { |
47 | public: |
48 | using QAbstractXmlReceiver::attribute; |
49 | using QAbstractXmlReceiver::characters; |
50 | |
51 | virtual void startElement(const QXmlName&); |
52 | virtual void endElement(); |
53 | virtual void attribute(const QXmlName&, const QStringRef&); |
54 | virtual void comment(const QString&); |
55 | virtual void characters(const QStringRef&); |
56 | virtual void startDocument(); |
57 | virtual void endDocument(); |
58 | virtual void processingInstruction(const QXmlName&, const QString&); |
59 | virtual void atomicValue(const QVariant&); |
60 | virtual void namespaceBinding(const QXmlName&); |
61 | virtual void startOfSequence(); |
62 | virtual void endOfSequence(); |
63 | |
64 | QString receivedFromCharacters; |
65 | QString receivedFromAttribute; |
66 | }; |
67 | |
68 | void TestAbstractXmlReceiver::startElement(const QXmlName &name) |
69 | { |
70 | Q_UNUSED(name); |
71 | } |
72 | |
73 | void TestAbstractXmlReceiver::endElement() |
74 | { |
75 | } |
76 | |
77 | void TestAbstractXmlReceiver::attribute(const QXmlName &name, const QStringRef &value) |
78 | { |
79 | Q_UNUSED(name); |
80 | receivedFromAttribute = value.toString(); |
81 | } |
82 | |
83 | void TestAbstractXmlReceiver::comment(const QString &value) |
84 | { |
85 | Q_UNUSED(value); |
86 | } |
87 | |
88 | void TestAbstractXmlReceiver::characters(const QStringRef &value) |
89 | { |
90 | receivedFromCharacters = value.toString(); |
91 | } |
92 | |
93 | void TestAbstractXmlReceiver::startDocument() |
94 | { |
95 | } |
96 | |
97 | void TestAbstractXmlReceiver::endDocument() |
98 | { |
99 | } |
100 | |
101 | void TestAbstractXmlReceiver::processingInstruction(const QXmlName &name, const QString &data) |
102 | { |
103 | Q_UNUSED(name); |
104 | Q_UNUSED(data); |
105 | } |
106 | |
107 | void TestAbstractXmlReceiver::atomicValue(const QVariant &val) |
108 | { |
109 | Q_UNUSED(val); |
110 | } |
111 | |
112 | void TestAbstractXmlReceiver::namespaceBinding(const QXmlName &name) |
113 | { |
114 | Q_UNUSED(name); |
115 | } |
116 | |
117 | void TestAbstractXmlReceiver::startOfSequence() |
118 | { |
119 | } |
120 | |
121 | void TestAbstractXmlReceiver::endOfSequence() |
122 | { |
123 | } |
124 | |
125 | #endif |
126 |