forked from qt-creator/qt-creator
Tests: Fix build
Change-Id: I6d9475bf2d95a1075d7a761f49d8edff89a30f78 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
add_qtc_executable(qml_ast2dot
|
add_qtc_executable(qml_ast2dot
|
||||||
BUILD_DEFAULT OFF
|
BUILD_DEFAULT OFF
|
||||||
DEPENDS Qt::Core Qt::Gui QmlJS
|
DEPENDS Qt::Core Qt::Gui QmlJS Utils
|
||||||
SOURCES main.cpp
|
SOURCES main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -7,6 +7,8 @@
|
|||||||
#include <qmljs/qmljsdocument.h>
|
#include <qmljs/qmljsdocument.h>
|
||||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
|
||||||
|
#include <utils/filepath.h>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -307,7 +309,8 @@ int main(int argc, char *argv[])
|
|||||||
const QByteArray source = file.readAll();
|
const QByteArray source = file.readAll();
|
||||||
file.close();
|
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->setSource(QString::fromUtf8(source));
|
||||||
doc->parse();
|
doc->parse();
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@ import qbs.FileInfo
|
|||||||
|
|
||||||
CppApplication {
|
CppApplication {
|
||||||
Depends { name: "QmlJS" }
|
Depends { name: "QmlJS" }
|
||||||
|
Depends { name: "Utils" }
|
||||||
Depends { name: "Qt.gui" }
|
Depends { name: "Qt.gui" }
|
||||||
|
|
||||||
cpp.cxxLanguageVersion: "c++17"
|
cpp.cxxLanguageVersion: "c++17"
|
||||||
|
Reference in New Issue
Block a user