QmlPuppet: Refactor ChangeFileUrlCommand

Change-Id: I900f530109b6cdbb22d8138094443b48834d16cb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Michael Winkelmann
2020-08-19 15:00:25 +02:00
parent 95aa7f42de
commit d39a6f656f
5 changed files with 18 additions and 43 deletions
@@ -25,41 +25,14 @@
#include "changefileurlcommand.h"
#include <QDataStream>
#include <QDebug>
namespace QmlDesigner {
ChangeFileUrlCommand::ChangeFileUrlCommand() = default;
ChangeFileUrlCommand::ChangeFileUrlCommand(const QUrl &fileUrl)
: m_fileUrl(fileUrl)
{
}
QUrl ChangeFileUrlCommand::fileUrl() const
{
return m_fileUrl;
}
QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command)
{
out << command.fileUrl();
return out;
}
QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command)
{
in >> command.m_fileUrl;
return in;
}
QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command)
{
return debug.nospace() << "ChangeFileUrlCommand("
<< "fileUrl: " << command.fileUrl() << ")";
<< "fileUrl: " << command.fileUrl << ")";
}
} // namespace QmlDesigner