2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2023-01-24 09:45:21 +00:00
|
|
|
|
2025-01-14 16:32:58 +00:00
|
|
|
#include <private/qmllsmain_p.h>
|
2025-03-20 10:01:28 +00:00
|
|
|
#include <QtCore/qcoreapplication.h>
|
2024-11-19 10:42:36 +00:00
|
|
|
|
2021-12-13 02:41:19 +00:00
|
|
|
// To debug:
|
|
|
|
//
|
|
|
|
// * simple logging can be redirected to a file
|
|
|
|
// passing -l <file> to the qmlls command
|
|
|
|
//
|
|
|
|
// * more complex debugging can use named pipes:
|
|
|
|
//
|
|
|
|
// mkfifo qmllsIn
|
|
|
|
// mkfifo qmllsOut
|
|
|
|
//
|
|
|
|
// this together with a qmllsEcho script that can be defined as
|
|
|
|
//
|
|
|
|
// #!/bin/sh
|
|
|
|
// cat -u < ~/qmllsOut &
|
|
|
|
// cat -u > ~/qmllsIn
|
|
|
|
//
|
|
|
|
// allows to use qmllsEcho as lsp server, and still easily start
|
|
|
|
// it in a terminal
|
|
|
|
//
|
|
|
|
// qmlls < ~/qmllsIn > ~/qmllsOut
|
|
|
|
//
|
|
|
|
// * statup can be slowed down to have the time to attach via the
|
|
|
|
// -w <nSeconds> flag.
|
|
|
|
|
2025-03-20 10:01:28 +00:00
|
|
|
using namespace Qt::StringLiterals;
|
|
|
|
|
2021-12-13 02:41:19 +00:00
|
|
|
int main(int argv, char *argc[])
|
|
|
|
{
|
2025-03-20 10:01:28 +00:00
|
|
|
QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
|
|
|
|
QCoreApplication::setApplicationName("qmlls"_L1);
|
2025-01-14 16:32:58 +00:00
|
|
|
return QmlLsp::qmllsMain(argv, argc);
|
2021-12-13 02:41:19 +00:00
|
|
|
}
|