From 465b0f8b4ce1e597d175e3bc007b4bba4d7f2684 Mon Sep 17 00:00:00 2001 From: Srevin Saju Date: Sat, 1 May 2021 17:12:14 +0300 Subject: [PATCH] feat: add matrix command possible 'parameter's --- src/commandmodel.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/commandmodel.h b/src/commandmodel.h index d70e0017a..63ef17409 100644 --- a/src/commandmodel.h +++ b/src/commandmodel.h @@ -10,9 +10,10 @@ #include struct Command { - Command(QString u, QString s) - : command(std::move(std::move(u))) - , help(std::move(std::move(s))) + Command(QString p, QString a, QString h) + : command(std::move(std::move(p))) + , parameter(std::move(std::move(a))) + , help(std::move(std::move(h))) { } Command() = default; @@ -20,6 +21,7 @@ struct Command { friend QDataStream &operator<<(QDataStream &arch, const Command &object) { arch << object.command; + arch << object.parameter; arch << object.help; return arch; } @@ -27,15 +29,18 @@ struct Command { friend QDataStream &operator>>(QDataStream &arch, Command &object) { arch >> object.command; + arch >> object.parameter; arch >> object.help; return arch; } QString command; + QString parameter; QString help; Q_GADGET Q_PROPERTY(QString command MEMBER command) + Q_PROPERTY(QString parameter MEMBER parameter) Q_PROPERTY(QString help MEMBER help) };