1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #include "stdoutjsonrpcparser.h" |
6 | #include "common/lsp/protocol/new/jsonrpcparser.h" |
7 | |
8 | newlsp::StdoutJsonRpcParser::StdoutJsonRpcParser(QObject *parent) |
9 | : QObject(parent) |
10 | , d (new JsonRpcParser) |
11 | { |
12 | QObject::connect(d, &JsonRpcParser::readedJsonObject, |
13 | this, &StdoutJsonRpcParser::readedJsonObject, |
14 | Qt::DirectConnection); |
15 | } |
16 | |
17 | newlsp::StdoutJsonRpcParser::~StdoutJsonRpcParser() |
18 | { |
19 | if (d) { |
20 | delete d; |
21 | } |
22 | } |
23 | |
24 | void newlsp::StdoutJsonRpcParser::doReadedLine(const QByteArray &line) |
25 | { |
26 | d->doParseReadLine(line); |
27 | } |
28 |