forked from qt-creator/qt-creator
Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
|
|
|
#include "changenodesourcecommand.h"
|
|
|
|
#include <QDataStream>
|
|
#include <QDebug>
|
|
|
|
namespace QmlDesigner {
|
|
|
|
ChangeNodeSourceCommand::ChangeNodeSourceCommand() = default;
|
|
|
|
ChangeNodeSourceCommand::ChangeNodeSourceCommand(qint32 newInstanceId, const QString &newNodeSource)
|
|
: m_instanceId(newInstanceId), m_nodeSource(newNodeSource)
|
|
{
|
|
}
|
|
|
|
qint32 ChangeNodeSourceCommand::instanceId() const
|
|
{
|
|
return m_instanceId;
|
|
}
|
|
|
|
QString ChangeNodeSourceCommand::nodeSource() const
|
|
{
|
|
return m_nodeSource;
|
|
}
|
|
|
|
QDataStream &operator<<(QDataStream &out, const ChangeNodeSourceCommand &command)
|
|
{
|
|
out << command.instanceId();
|
|
out << command.nodeSource();
|
|
|
|
return out;
|
|
}
|
|
|
|
QDataStream &operator>>(QDataStream &in, ChangeNodeSourceCommand &command)
|
|
{
|
|
in >> command.m_instanceId;
|
|
in >> command.m_nodeSource;
|
|
|
|
return in;
|
|
}
|
|
|
|
QDebug operator <<(QDebug debug, const ChangeNodeSourceCommand &command)
|
|
{
|
|
return debug.nospace() << "ReparentInstancesCommand("
|
|
<< "instanceId: " << command.m_instanceId
|
|
<< "nodeSource: " << command.m_nodeSource << ")";
|
|
}
|
|
|
|
} // namespace QmlDesigner
|