Files
qt-creator/share/qtcreator/qml/qmlpuppet/commands/synchronizecommand.cpp
Lucie Gérard a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00

51 lines
1.0 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 "synchronizecommand.h"
#include <QDebug>
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;
}
bool operator ==(const SynchronizeCommand &first, const SynchronizeCommand &second)
{
return first.m_synchronizeId == second.m_synchronizeId;
}
QDebug operator <<(QDebug debug, const SynchronizeCommand &command)
{
return debug.nospace() << "SynchronizeCommand(synchronizeId: " << command.synchronizeId() << ")";
}
} // namespace QmlDesigner