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
|
2011-02-22 12:08:19 +01:00
|
|
|
|
2011-01-18 18:23:28 +01:00
|
|
|
#include "synchronizecommand.h"
|
|
|
|
|
|
2013-07-16 17:00:07 +02:00
|
|
|
#include <QDebug>
|
|
|
|
|
|
2011-01-18 18:23:28 +01:00
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
|
|
SynchronizeCommand::SynchronizeCommand()
|
|
|
|
|
: m_synchronizeId(-1)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SynchronizeCommand::SynchronizeCommand(int synchronizeId)
|
|
|
|
|
: m_synchronizeId (synchronizeId)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SynchronizeCommand::synchronizeId() const
|
|
|
|
|
{
|
|
|
|
|
return m_synchronizeId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QDataStream &operator<<(QDataStream &out, const SynchronizeCommand &command)
|
|
|
|
|
{
|
|
|
|
|
out << command.synchronizeId();
|
|
|
|
|
|
|
|
|
|
return out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, SynchronizeCommand &command)
|
|
|
|
|
{
|
|
|
|
|
in >> command.m_synchronizeId;
|
|
|
|
|
|
|
|
|
|
return in;
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-04 17:06:31 +02:00
|
|
|
bool operator ==(const SynchronizeCommand &first, const SynchronizeCommand &second)
|
|
|
|
|
{
|
|
|
|
|
return first.m_synchronizeId == second.m_synchronizeId;
|
|
|
|
|
}
|
2011-01-18 18:23:28 +01:00
|
|
|
|
2013-07-16 17:00:07 +02:00
|
|
|
QDebug operator <<(QDebug debug, const SynchronizeCommand &command)
|
|
|
|
|
{
|
|
|
|
|
return debug.nospace() << "SynchronizeCommand(synchronizeId: " << command.synchronizeId() << ")";
|
|
|
|
|
}
|
|
|
|
|
|
2011-01-18 18:23:28 +01:00
|
|
|
} // namespace QmlDesigner
|