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:
Christian Stenger
2024-04-12 14:46:38 +02:00
parent 9019520d62
commit f720835680
3 changed files with 6 additions and 2 deletions

View File

@@ -7,6 +7,8 @@
#include <qmljs/qmljsdocument.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <utils/filepath.h>
#include <QFile>
#include <QList>
#include <QCoreApplication>
@@ -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();