diff --git a/tests/tools/qml-ast2dot/CMakeLists.txt b/tests/tools/qml-ast2dot/CMakeLists.txt index ba4acfb9dc4..69ecc371f92 100644 --- a/tests/tools/qml-ast2dot/CMakeLists.txt +++ b/tests/tools/qml-ast2dot/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_executable(qml_ast2dot BUILD_DEFAULT OFF - DEPENDS Qt::Core Qt::Gui QmlJS + DEPENDS Qt::Core Qt::Gui QmlJS Utils SOURCES main.cpp ) diff --git a/tests/tools/qml-ast2dot/main.cpp b/tests/tools/qml-ast2dot/main.cpp index eed9c8604a4..8b3508e99ef 100644 --- a/tests/tools/qml-ast2dot/main.cpp +++ b/tests/tools/qml-ast2dot/main.cpp @@ -7,6 +7,8 @@ #include #include +#include + #include #include #include @@ -307,7 +309,8 @@ int main(int argc, char *argv[]) const QByteArray source = file.readAll(); file.close(); - Document::MutablePtr doc = Document::create(fileName, ModelManagerInterface::guessLanguageOfFile(fileName)); + const Utils::FilePath filePath = Utils::FilePath::fromUserInput(fileName); + Document::MutablePtr doc = Document::create(filePath, ModelManagerInterface::guessLanguageOfFile(filePath)); doc->setSource(QString::fromUtf8(source)); doc->parse(); diff --git a/tests/tools/qml-ast2dot/qml-ast2dot.qbs b/tests/tools/qml-ast2dot/qml-ast2dot.qbs index 2fbf3676c99..1b067995add 100644 --- a/tests/tools/qml-ast2dot/qml-ast2dot.qbs +++ b/tests/tools/qml-ast2dot/qml-ast2dot.qbs @@ -2,6 +2,7 @@ import qbs.FileInfo CppApplication { Depends { name: "QmlJS" } + Depends { name: "Utils" } Depends { name: "Qt.gui" } cpp.cxxLanguageVersion: "c++17"