diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-12 16:55:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-23 21:16:46 +0200 |
commit | a885d10a0289da85b8c966d2fa40fb10edae4fd7 (patch) | |
tree | 7c16b5abd88d436f6596d6a424126c1b1dd2aba8 /src/qml/qml/qqmldirparser_p.h | |
parent | 937fdde5d3b26291d417f856ee05ba479a6ba730 (diff) |
Extend the QML bootstrap library by the IR builders
This is among other things needed to fix the qml import scanner to detect
dependencies from .js files correctly.
The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT
where appropriate and corrects the wrong include path for the double conversion
code to actually be relative to the file it is included from. This worked by
accident because of other include paths present in the build.
Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmldirparser_p.h')
-rw-r--r-- | src/qml/qml/qqmldirparser_p.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/qml/qml/qqmldirparser_p.h b/src/qml/qml/qqmldirparser_p.h index e3607d1e72..bcdb366c6c 100644 --- a/src/qml/qml/qqmldirparser_p.h +++ b/src/qml/qml/qqmldirparser_p.h @@ -56,13 +56,14 @@ #include <QtCore/QUrl> #include <QtCore/QHash> #include <QtCore/QDebug> -#include <private/qhashedstring_p.h> +#include <private/qqmljsengine_p.h> +#include <private/qtqmlglobal_p.h> QT_BEGIN_NAMESPACE class QQmlError; class QQmlEngine; -class Q_AUTOTEST_EXPORT QQmlDirParser +class Q_QML_PRIVATE_EXPORT QQmlDirParser { Q_DISABLE_COPY(QQmlDirParser) @@ -73,8 +74,12 @@ public: bool parse(const QString &source); bool hasError() const; +#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) + QList<QQmlJS::DiagnosticMessage> errors(const QString &uri) const; +#else void setError(const QQmlError &); QList<QQmlError> errors(const QString &uri) const; +#endif QString typeNamespace() const; void setTypeNamespace(const QString &s); @@ -121,7 +126,7 @@ public: int minorVersion; }; - QHash<QHashedStringRef,Component> components() const; + QHash<QString,Component> components() const; QList<Script> scripts() const; QList<Plugin> plugins() const; @@ -142,9 +147,9 @@ private: void reportError(quint16 line, quint16 column, const QString &message); private: - QList<QQmlError> _errors; + QList<QQmlJS::DiagnosticMessage> _errors; QString _typeNamespace; - QHash<QHashedStringRef,Component> _components; // multi hash + QHash<QString,Component> _components; // multi hash QList<Script> _scripts; QList<Plugin> _plugins; #ifdef QT_CREATOR @@ -152,7 +157,7 @@ private: #endif }; -typedef QHash<QHashedStringRef,QQmlDirParser::Component> QQmlDirComponents; +typedef QHash<QString,QQmlDirParser::Component> QQmlDirComponents; typedef QList<QQmlDirParser::Script> QQmlDirScripts; typedef QList<QQmlDirParser::Plugin> QQmlDirPlugins; |