QmlPuppet: Refactor ChangeIdsCommand

Change-Id: I75de863121b66a5050226dd5c8914229cb1af608
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Michael Winkelmann
2020-08-19 16:54:09 +02:00
parent d39a6f656f
commit 44a3c092a0
6 changed files with 20 additions and 48 deletions

View File

@@ -29,35 +29,9 @@
namespace QmlDesigner {
ChangeIdsCommand::ChangeIdsCommand() = default;
ChangeIdsCommand::ChangeIdsCommand(const QVector<IdContainer> &idVector)
: m_idVector(idVector)
{
}
QVector<IdContainer> ChangeIdsCommand::ids() const
{
return m_idVector;
}
QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command)
{
out << command.ids();
return out;
}
QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command)
{
in >> command.m_idVector;
return in;
}
QDebug operator <<(QDebug debug, const ChangeIdsCommand &command)
{
return debug.nospace() << "ChangeIdsCommand(ids: " << command.m_idVector << ")";
return debug.nospace() << "ChangeIdsCommand(ids: " << command.ids << ")";
}
} // namespace QmlDesigner