diff options
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h index b92fb3b558c..cb6ec1a617f 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changeidscommand.h @@ -27,7 +27,7 @@ #include <QMetaType> #include <QVector> - +#include <QDataStream> #include "idcontainer.h" @@ -35,24 +35,23 @@ namespace QmlDesigner { class ChangeIdsCommand { - friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command); - friend QDebug operator <<(QDebug debug, const ChangeIdsCommand &command); - public: - ChangeIdsCommand(); - explicit ChangeIdsCommand(const QVector<IdContainer> &idVector); - - QVector<IdContainer> ids() const; + friend QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command) + { + in >> command.ids; + return in; + } + + friend QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command) + { + out << command.ids; + return out; + } + friend QDebug operator <<(QDebug debug, const ChangeIdsCommand &command); -private: - QVector<IdContainer> m_idVector; + QVector<IdContainer> ids; }; -QDataStream &operator<<(QDataStream &out, const ChangeIdsCommand &command); -QDataStream &operator>>(QDataStream &in, ChangeIdsCommand &command); - -QDebug operator <<(QDebug debug, const ChangeIdsCommand &command); - } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::ChangeIdsCommand) |