diff options
author | Michael Winkelmann <michael.winkelmann@qt.io> | 2020-08-19 15:00:25 +0200 |
---|---|---|
committer | Michael Winkelmann <michael.winkelmann@qt.io> | 2020-08-20 09:33:13 +0000 |
commit | d39a6f656fdbc3c3fafcd87d422feda721ac7311 (patch) | |
tree | 1a71814e886aae3bfd919623d4777b24c715921d /share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h | |
parent | 95aa7f42dee37ec50150c10863864660885a1574 (diff) |
QmlPuppet: Refactor ChangeFileUrlCommand
Change-Id: I900f530109b6cdbb22d8138094443b48834d16cb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h index 5645274fc4..bc73f40807 100644 --- a/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h +++ b/share/qtcreator/qml/qmlpuppet/commands/changefileurlcommand.h @@ -26,28 +26,30 @@ #pragma once #include <qmetatype.h> +#include <QDataStream> #include <QUrl> namespace QmlDesigner { class ChangeFileUrlCommand { - friend QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command); public: - ChangeFileUrlCommand(); - explicit ChangeFileUrlCommand(const QUrl &fileUrl); + friend QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command) + { + in >> command.fileUrl; + return in; + } - QUrl fileUrl() const; - -private: - QUrl m_fileUrl; -}; + friend QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command) + { + out << command.fileUrl; + return out; + } + friend QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command); -QDataStream &operator<<(QDataStream &out, const ChangeFileUrlCommand &command); -QDataStream &operator>>(QDataStream &in, ChangeFileUrlCommand &command); - -QDebug operator <<(QDebug debug, const ChangeFileUrlCommand &command); + QUrl fileUrl; +}; } // namespace QmlDesigner |