From 20927cbc98cf6bda8dab9ab5f3753f59855752bc Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 13 Mar 2015 12:47:16 +0100 Subject: Remove QQmlDirParser from QtQmlDevTools This class is not needed in the library. Change-Id: Ie880086a849b62a2856d1f388a64d363b040cb56 Reviewed-by: Frederik Gladhorn Reviewed-by: Oswald Buddenhagen --- src/qml/qml/qml.pri | 16 ++++------------ src/qml/qml/qqmldirparser.cpp | 12 ------------ src/qml/qml/qqmldirparser_p.h | 4 ---- src/qmldevtools/qmldevtools.pro | 1 - tests/auto/qmldevtools/compile/tst_compile.cpp | 1 - 5 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/qml/qml/qml.pri b/src/qml/qml/qml.pri index cad839ba9d..74514a313f 100644 --- a/src/qml/qml/qml.pri +++ b/src/qml/qml/qml.pri @@ -1,11 +1,3 @@ -SOURCES += \ - $$PWD/qqmldirparser.cpp \ - -HEADERS += \ - $$PWD/qqmldirparser_p.h \ - -!qmldevtools_build { - SOURCES += \ $$PWD/qqmlopenmetaobject.cpp \ $$PWD/qqmlvmemetaobject.cpp \ @@ -59,7 +51,8 @@ SOURCES += \ $$PWD/qqmlvaluetypewrapper.cpp \ $$PWD/qqmltypewrapper.cpp \ $$PWD/qqmlfileselector.cpp \ - $$PWD/qqmlobjectcreator.cpp + $$PWD/qqmlobjectcreator.cpp \ + $$PWD/qqmldirparser.cpp HEADERS += \ $$PWD/qqmlglobal_p.h \ @@ -133,9 +126,8 @@ HEADERS += \ $$PWD/qqmltypewrapper_p.h \ $$PWD/qqmlfileselector_p.h \ $$PWD/qqmlfileselector.h \ - $$PWD/qqmlobjectcreator_p.h + $$PWD/qqmlobjectcreator_p.h \ + $$PWD/qqmldirparser_p.h include(ftw/ftw.pri) include(v8/v8.pri) - -} diff --git a/src/qml/qml/qqmldirparser.cpp b/src/qml/qml/qqmldirparser.cpp index 2c126a996d..7f6310d58e 100644 --- a/src/qml/qml/qqmldirparser.cpp +++ b/src/qml/qml/qqmldirparser.cpp @@ -294,17 +294,6 @@ bool QQmlDirParser::hasError() const return false; } -#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) -QList QQmlDirParser::errors(const QString &uri) const -{ - QList errors = _errors; - for (int i = 0; i < errors.size(); ++i) { - QQmlJS::DiagnosticMessage &msg = errors[i]; - msg.message.replace(QLatin1String("$$URI$$"), uri); - } - return errors; -} -#else void QQmlDirParser::setError(const QQmlError &e) { _errors.clear(); @@ -328,7 +317,6 @@ QList QQmlDirParser::errors(const QString &uri) const } return errors; } -#endif QString QQmlDirParser::typeNamespace() const { diff --git a/src/qml/qml/qqmldirparser_p.h b/src/qml/qml/qqmldirparser_p.h index 0486187a5c..9e90abcffb 100644 --- a/src/qml/qml/qqmldirparser_p.h +++ b/src/qml/qml/qqmldirparser_p.h @@ -66,12 +66,8 @@ public: bool parse(const QString &source); bool hasError() const; -#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB) - QList errors(const QString &uri) const; -#else void setError(const QQmlError &); QList errors(const QString &uri) const; -#endif QString typeNamespace() const; void setTypeNamespace(const QString &s); diff --git a/src/qmldevtools/qmldevtools.pro b/src/qmldevtools/qmldevtools.pro index 5af5443df7..589b90a71f 100644 --- a/src/qmldevtools/qmldevtools.pro +++ b/src/qmldevtools/qmldevtools.pro @@ -22,4 +22,3 @@ include(../3rdparty/masm/masm-defs.pri) include(../qml/parser/parser.pri) include(../qml/jsruntime/jsruntime.pri) include(../qml/compiler/compiler.pri) -include(../qml/qml/qml.pri) diff --git a/tests/auto/qmldevtools/compile/tst_compile.cpp b/tests/auto/qmldevtools/compile/tst_compile.cpp index b7115eef3e..b19260779c 100644 --- a/tests/auto/qmldevtools/compile/tst_compile.cpp +++ b/tests/auto/qmldevtools/compile/tst_compile.cpp @@ -39,7 +39,6 @@ #include #include #include -#include int main() { -- cgit v1.2.3