Remove QQmlDirParser from QtQmlDevTools
authorSimon Hausmann <simon.hausmann@theqtcompany.com>
Fri, 13 Mar 2015 11:47:16 +0000 (12:47 +0100)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Mon, 16 Mar 2015 10:27:02 +0000 (10:27 +0000)
This class is not needed in the library.

Change-Id: Ie880086a849b62a2856d1f388a64d363b040cb56
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
src/qml/qml/qml.pri
src/qml/qml/qqmldirparser.cpp
src/qml/qml/qqmldirparser_p.h
src/qmldevtools/qmldevtools.pro
tests/auto/qmldevtools/compile/tst_compile.cpp

index cad839ba9dd5734d04e80a8cad8efdb560dadeee..74514a313f106e8778f6bf8fae250a4febe6b49c 100644 (file)
@@ -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)
-
-}
index 2c126a996da034281f30747f3a8fa24fb59b224b..7f6310d58e51cc5c43666ce620f101092613d6cc 100644 (file)
@@ -294,17 +294,6 @@ bool QQmlDirParser::hasError() const
     return false;
 }
 
-#if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
-QList<QQmlJS::DiagnosticMessage> QQmlDirParser::errors(const QString &uri) const
-{
-    QList<QQmlJS::DiagnosticMessage> 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<QQmlError> QQmlDirParser::errors(const QString &uri) const
     }
     return errors;
 }
-#endif
 
 QString QQmlDirParser::typeNamespace() const
 {
index 0486187a5cee083dbc6420c251ea9c0163f2a132..9e90abcffb9b3ae2d42d173cc3e53d95a0500ecb 100644 (file)
@@ -66,12 +66,8 @@ 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);
index 5af5443df7f1cd81985730d113d9b7ca8244c915..589b90a71ff993821eb13184c2d2e61fd5366a29 100644 (file)
@@ -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)
index b7115eef3ef73e9216aa05914e28607d456c38c6..b19260779c1856579ecc1cb4ecc5dffee32a93da 100644 (file)
@@ -39,7 +39,6 @@
 #include <private/qqmlirbuilder_p.h>
 #include <private/qv4value_inl_p.h>
 #include <private/qv4codegen_p.h>
-#include <private/qqmldirparser_p.h>
 
 int main()
 {