aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmldebug/qmloutputparser.h
blob: 16d5e46780cefcaae1c30157a7edd9e5f3bdfa6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "qmldebug_global.h"

#include <utils/port.h>
#include <QObject>

namespace QmlDebug {

class QMLDEBUG_EXPORT QmlOutputParser : public QObject
{
    Q_OBJECT
public:
    QmlOutputParser(QObject *parent = nullptr);

    void setNoOutputText(const QString &text);
    void processOutput(const QString &output);

signals:
    void waitingForConnectionOnPort(Utils::Port port);
    void connectionEstablishedMessage();
    void connectingToSocketMessage();
    void errorMessage(const QString &detailedError);
    void unknownMessage(const QString &unknownMessage);
    void noOutputMessage();

private:
    QString m_noOutputText;
    QString m_buffer;
};

} // namespace QmlDebug