forked from qt-creator/qt-creator
QmlPuppet: Refactor ChangeIdsCommand
Change-Id: I75de863121b66a5050226dd5c8914229cb1af608 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user