diff options
Diffstat (limited to 'ApiExtractor/typesystem_p.h')
-rw-r--r-- | ApiExtractor/typesystem_p.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/ApiExtractor/typesystem_p.h b/ApiExtractor/typesystem_p.h index a41f6cd74..d359f9b45 100644 --- a/ApiExtractor/typesystem_p.h +++ b/ApiExtractor/typesystem_p.h @@ -29,9 +29,11 @@ #define TYPESYSTEM_P_H #include <QStack> -#include <QtXml/QXmlDefaultHandler> #include "typesystem.h" +QT_FORWARD_DECLARE_CLASS(QXmlStreamAttributes) +QT_FORWARD_DECLARE_CLASS(QXmlStreamReader) + class TypeDatabase; class StackElement { @@ -129,31 +131,21 @@ struct StackElementContext DocModificationList docModifications; }; -class Handler : public QXmlDefaultHandler +class Handler { public: Handler(TypeDatabase* database, bool generate); - bool startElement(const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); - bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName); - - QString errorString() const - { - return m_error; - } - - bool error(const QXmlParseException &exception); - bool fatalError(const QXmlParseException &exception); - bool warning(const QXmlParseException &exception); - - bool characters(const QString &ch); + bool parse(QXmlStreamReader &reader); private: - void fetchAttributeValues(const QString &name, const QXmlAttributes &atts, + bool startElement(const QStringRef& localName, const QXmlStreamAttributes& atts); + bool endElement(const QStringRef& localName); + bool characters(const QString &ch); + void fetchAttributeValues(const QString &name, const QXmlStreamAttributes &atts, QHash<QString, QString> *acceptedAttributes); - bool importFileElement(const QXmlAttributes &atts); + bool importFileElement(const QXmlStreamAttributes &atts); bool convertBoolean(const QString &, const QString &, bool); void addFlags(const QString &name, QString flagName, const QHash<QString, QString> &attributes, double since); |