aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlls/qqmllanguageserver.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmlls/qqmllanguageserver.h')
-rw-r--r--tools/qmlls/qqmllanguageserver.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/tools/qmlls/qqmllanguageserver.h b/tools/qmlls/qqmllanguageserver.h
deleted file mode 100644
index 7efe93990a..0000000000
--- a/tools/qmlls/qqmllanguageserver.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-#ifndef QQMLLANGUAGESERVER_H
-#define QQMLLANGUAGESERVER_H
-
-#include "qlanguageserver_p.h"
-#include "qqmlcodemodel.h"
-#include "textsynchronization.h"
-#include "qmllintsuggestions.h"
-#include "workspace.h"
-#include "qmlcompletionsupport.h"
-#include "../shared/qqmltoolingsettings.h"
-
-QT_BEGIN_NAMESPACE
-namespace QmlLsp {
-
-/*
- * The language server protocol calls "URI" what QML calls "URL".
- * According to RFC 3986, a URL is a special case of URI that not only
- * identifies a resource but also shows how to access it.
- * In QML, however, URIs are distinct from URLs. URIs are the
- * identifiers of modules, for example "QtQuick.Controls".
- * In order to not confuse the terms we interpret language server URIs
- * as URLs in the QML code model.
- * This method marks a point of translation between the terms, but does
- * not have to change the actual URI/URL.
- */
-inline QByteArray lspUriToQmlUrl(const QByteArray &uri) { return uri; }
-
-class QQmlLanguageServer : public QLanguageServerModule
-{
- Q_OBJECT
-public:
- QQmlLanguageServer(std::function<void(const QByteArray &)> sendData,
- QQmlToolingSettings *settings = nullptr);
-
- QString name() const final;
- void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) final;
- void setupCapabilities(const QLspSpecification::InitializeParams &clientInfo,
- QLspSpecification::InitializeResult &serverInfo) final;
-
- int returnValue() const;
-
- QQmlCodeModel *codeModel();
- QLanguageServer *server();
- TextSynchronization *textSynchronization();
- QmlLintSuggestions *lint();
- WorkspaceHandlers *worspace();
-
-public Q_SLOTS:
- void exit();
- void errorExit();
-
-private:
- QQmlCodeModel m_codeModel;
- QLanguageServer m_server;
- TextSynchronization m_textSynchronization;
- QmlLintSuggestions m_lint;
- WorkspaceHandlers m_workspace;
- QmlCompletionSupport m_completionSupport;
- int m_returnValue = 1;
-};
-
-} // namespace QmlLsp
-QT_END_NAMESPACE
-#endif // QQMLLANGUAGESERVER_H