blob: b24662ef35e673da5eb5c1adf9ff1c61cb163a2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#ifndef QMLSCRIPTPARSER_P_H
#define QMLSCRIPTPARSER_P_H
#include <qml.h>
#include <private/qmlcomponent_p.h>
#include <private/qmlparser_p.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QByteArray;
class QmlScriptParser
{
public:
QmlScriptParser();
~QmlScriptParser();
bool parse(const QByteArray &data, const QUrl &url = QUrl());
QString errorDescription() const;
int errorLine() const;
QMap<QString,QString> nameSpacePaths() const;
QStringList types() const;
QmlParser::Object *tree() const;
// ### private:
int findOrCreateTypeId(const QString &name);
void setTree(QmlParser::Object *tree);
private:
QMap<QString,QString> _nameSpacePaths;
QmlParser::Object *root;
QStringList _typeNames;
QString _error;
int _errorLine;
};
QT_END_NAMESPACE
QT_END_HEADER
#endif // QMLSCRIPTPARSER_P_H
|