aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-01 12:40:01 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-05 14:58:32 +0200
commit767dd738d3de9306062707fe05d32c91ed755da3 (patch)
treeebadcc9809322d5d78ce28f9b82bad1db949f232 /tools/qmllint
parente7d90fc5268cdca6aa10f422f00ad4a0049ea157 (diff)
Long live libQtQmlCompiler!
Move all the code from tools/shared into src/qmlcompiler and build a static library from it so that we can re-use it in external tools. Change-Id: I7c8d8e59063dc7c711f4072f103a01095e6f5997 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint')
-rw-r--r--tools/qmllint/.prev_CMakeLists.txt9
-rw-r--r--tools/qmllint/CMakeLists.txt9
-rw-r--r--tools/qmllint/checkidentifiers.h4
-rw-r--r--tools/qmllint/findwarnings.cpp9
-rw-r--r--tools/qmllint/findwarnings.h7
-rw-r--r--tools/qmllint/qmllint.pro6
6 files changed, 14 insertions, 30 deletions
diff --git a/tools/qmllint/.prev_CMakeLists.txt b/tools/qmllint/.prev_CMakeLists.txt
index 3034d8699f..923371c587 100644
--- a/tools/qmllint/.prev_CMakeLists.txt
+++ b/tools/qmllint/.prev_CMakeLists.txt
@@ -8,20 +8,13 @@ qt_get_tool_target_name(target_name qmllint)
qt_add_tool(${target_name}
TARGET_DESCRIPTION "QML Syntax Verifier"
SOURCES
- ../shared/importedmembersvisitor.cpp ../shared/importedmembersvisitor.h
- ../shared/metatypes.h
- ../shared/qmljsimporter.cpp ../shared/qmljsimporter.h
- ../shared/qmljstypereader.cpp ../shared/qmljstypereader.h
- ../shared/scopetree.cpp ../shared/scopetree.h
- ../shared/typedescriptionreader.cpp ../shared/typedescriptionreader.h
checkidentifiers.cpp checkidentifiers.h
findwarnings.cpp findwarnings.h
main.cpp
qcoloroutput.cpp qcoloroutput.h
- INCLUDE_DIRECTORIES
- ../shared
PUBLIC_LIBRARIES
Qt::CorePrivate
+ Qt::QmlCompilerPrivate
Qt::QmlDevToolsPrivate
)
diff --git a/tools/qmllint/CMakeLists.txt b/tools/qmllint/CMakeLists.txt
index e9d92cc134..9230d8117b 100644
--- a/tools/qmllint/CMakeLists.txt
+++ b/tools/qmllint/CMakeLists.txt
@@ -9,20 +9,13 @@ qt_add_tool(${target_name}
TARGET_DESCRIPTION "QML Syntax Verifier"
TOOLS_TARGET Qml # special case
SOURCES
- ../shared/importedmembersvisitor.cpp ../shared/importedmembersvisitor.h
- ../shared/metatypes.h
- ../shared/qmljsimporter.cpp ../shared/qmljsimporter.h
- ../shared/qmljstypereader.cpp ../shared/qmljstypereader.h
- ../shared/scopetree.cpp ../shared/scopetree.h
- ../shared/typedescriptionreader.cpp ../shared/typedescriptionreader.h
checkidentifiers.cpp checkidentifiers.h
findwarnings.cpp findwarnings.h
main.cpp
qcoloroutput.cpp qcoloroutput.h
- INCLUDE_DIRECTORIES
- ../shared
PUBLIC_LIBRARIES
Qt::CorePrivate
+ Qt::QmlCompilerPrivate
Qt::QmlDevToolsPrivate
)
diff --git a/tools/qmllint/checkidentifiers.h b/tools/qmllint/checkidentifiers.h
index f05a227be7..181b54d290 100644
--- a/tools/qmllint/checkidentifiers.h
+++ b/tools/qmllint/checkidentifiers.h
@@ -29,8 +29,8 @@
#ifndef CHECKIDENTIFIERS_H
#define CHECKIDENTIFIERS_H
-#include "scopetree.h"
-#include "qmljsimporter.h"
+#include <QtQmlCompiler/private/scopetree_p.h>
+#include <QtQmlCompiler/private/qmljsimporter_p.h>
class ColorOutput;
diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp
index e2a5834109..128e931277 100644
--- a/tools/qmllint/findwarnings.cpp
+++ b/tools/qmllint/findwarnings.cpp
@@ -27,11 +27,12 @@
****************************************************************************/
#include "findwarnings.h"
-#include "importedmembersvisitor.h"
-#include "scopetree.h"
-#include "typedescriptionreader.h"
#include "checkidentifiers.h"
-#include "qmljstypereader.h"
+
+#include <QtQmlCompiler/private/importedmembersvisitor_p.h>
+#include <QtQmlCompiler/private/scopetree_p.h>
+#include <QtQmlCompiler/private/typedescriptionreader_p.h>
+#include <QtQmlCompiler/private/qmljstypereader_p.h>
#include <QtQml/private/qqmljsast_p.h>
#include <QtQml/private/qqmljslexer_p.h>
diff --git a/tools/qmllint/findwarnings.h b/tools/qmllint/findwarnings.h
index 95d4055cbe..2f5007b124 100644
--- a/tools/qmllint/findwarnings.h
+++ b/tools/qmllint/findwarnings.h
@@ -39,12 +39,13 @@
//
// We mean it.
-#include "typedescriptionreader.h"
-#include "scopetree.h"
#include "qcoloroutput.h"
-#include "qmljsimporter.h"
#include "checkidentifiers.h"
+#include <QtQmlCompiler/private/typedescriptionreader_p.h>
+#include <QtQmlCompiler/private/scopetree_p.h>
+#include <QtQmlCompiler/private/qmljsimporter_p.h>
+
#include <QtQml/private/qqmldirparser_p.h>
#include <QtQml/private/qqmljsastvisitor_p.h>
#include <QtQml/private/qqmljsast_p.h>
diff --git a/tools/qmllint/qmllint.pro b/tools/qmllint/qmllint.pro
index 44bf2e7ce5..1007ec5060 100644
--- a/tools/qmllint/qmllint.pro
+++ b/tools/qmllint/qmllint.pro
@@ -1,11 +1,8 @@
option(host_build)
-QT = core-private qmldevtools-private
-
-include(../shared/shared.pri)
+QT = core-private qmldevtools-private qmlcompiler-private
SOURCES += \
- $$METATYPEREADER_SOURCES \
checkidentifiers.cpp \
main.cpp \
findwarnings.cpp \
@@ -16,7 +13,6 @@ QMAKE_TARGET_DESCRIPTION = QML Syntax Verifier
load(qt_tool)
HEADERS += \
- $$METATYPEREADER_HEADERS \
checkidentifiers.h \
findwarnings.h \
qcoloroutput.h