2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2012-11-05 16:42:31 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-11-05 16:42:31 +01:00
|
|
|
|
|
|
|
|
#include <QMetaType>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QDataStream>
|
2015-02-18 13:32:35 +01:00
|
|
|
#include <QVector>
|
2012-11-05 16:42:31 +01:00
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
|
|
class DebugOutputCommand
|
|
|
|
|
{
|
|
|
|
|
friend QDataStream &operator>>(QDataStream &in, DebugOutputCommand &command);
|
2013-07-04 17:06:31 +02:00
|
|
|
friend bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &second);
|
2012-11-05 16:42:31 +01:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
enum Type {
|
|
|
|
|
DebugType,
|
|
|
|
|
WarningType,
|
|
|
|
|
ErrorType,
|
|
|
|
|
FatalType
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
DebugOutputCommand();
|
2015-02-18 13:32:35 +01:00
|
|
|
explicit DebugOutputCommand(const QString &text, Type type, const QVector<qint32> &instanceIds);
|
2012-11-05 16:42:31 +01:00
|
|
|
|
|
|
|
|
qint32 type() const;
|
|
|
|
|
QString text() const;
|
2015-02-18 13:32:35 +01:00
|
|
|
QVector<qint32> instanceIds() const;
|
2012-11-05 16:42:31 +01:00
|
|
|
|
|
|
|
|
private:
|
2015-02-18 13:32:35 +01:00
|
|
|
QVector<qint32> m_instanceIds;
|
2012-11-05 16:42:31 +01:00
|
|
|
QString m_text;
|
|
|
|
|
quint32 m_type;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
QDataStream &operator<<(QDataStream &out, const DebugOutputCommand &command);
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, DebugOutputCommand &command);
|
|
|
|
|
|
2013-07-04 17:06:31 +02:00
|
|
|
bool operator ==(const DebugOutputCommand &first, const DebugOutputCommand &second);
|
2013-07-16 17:00:07 +02:00
|
|
|
QDebug operator <<(QDebug debug, const DebugOutputCommand &command);
|
2013-07-04 17:06:31 +02:00
|
|
|
|
2012-11-05 16:42:31 +01:00
|
|
|
} // namespace QmlDesigner
|
|
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(QmlDesigner::DebugOutputCommand)
|