From eadbb133a6688b02e17de74f7e71b42f68836329 Mon Sep 17 00:00:00 2001 From: APTX Date: Sat, 5 Feb 2011 22:56:40 +0100 Subject: [PATCH] Add missing default constructors for *Command classes. --- mylistaddcommand.cpp | 4 ++++ mylistaddcommand.h | 1 + rawcommand.cpp | 10 ++++++++++ rawcommand.h | 5 ++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/mylistaddcommand.cpp b/mylistaddcommand.cpp index a22f0a6..9355f36 100644 --- a/mylistaddcommand.cpp +++ b/mylistaddcommand.cpp @@ -10,6 +10,10 @@ namespace AniDBUdpClient { +MyListAddCommand::MyListAddCommand() : AbstractCommand() +{ + init(); +} MyListAddCommand::MyListAddCommand(int fid, bool edit) : AbstractCommand() { diff --git a/mylistaddcommand.h b/mylistaddcommand.h index 0187487..d2e78a1 100644 --- a/mylistaddcommand.h +++ b/mylistaddcommand.h @@ -39,6 +39,7 @@ public: Viewed = 1, }; + MyListAddCommand(); MyListAddCommand(int fid, bool edit); MyListAddCommand(const QByteArray &ed2k, qint64 size, bool edit); explicit MyListAddCommand(int lid); diff --git a/rawcommand.cpp b/rawcommand.cpp index 8cce132..a442dba 100644 --- a/rawcommand.cpp +++ b/rawcommand.cpp @@ -8,6 +8,16 @@ RawCommand::RawCommand(const QString &command, bool requireAuthentication) : Abs m_requiresSession = requireAuthentication; } +void RawCommand::setCommand(const QString &command) +{ + m_command = command; +} + +QString RawCommand::command() const +{ + return m_command; +} + void RawCommand::setRequiresSession(bool requiresSession) { m_requiresSession = requiresSession; diff --git a/rawcommand.h b/rawcommand.h index 5b088be..3d82239 100644 --- a/rawcommand.h +++ b/rawcommand.h @@ -11,7 +11,10 @@ class ANIDBUDPCLIENTSHARED_EXPORT RawCommand : public AbstractCommand { public: typedef RawReply ReplyType; - RawCommand(const QString &command, bool requiresSession = true); + RawCommand(const QString &command = QString(), bool requiresSession = true); + + void setCommand(const QString &command); + QString command() const; void setRequiresSession(bool requiresSession); -- 2.52.0