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