]> Some of my projects - anidbudpclient.git/commitdiff
Add stateSet() method to MyListAddReply.
authorAPTX <marek321@gmail.com>
Thu, 12 Jan 2012 19:54:15 +0000 (20:54 +0100)
committerAPTX <marek321@gmail.com>
Thu, 12 Jan 2012 19:54:15 +0000 (20:54 +0100)
mylistaddcommand.cpp
mylistaddcommand.h

index cd15b6367fd3bc7879871e83bb6a181ee61a7035..fd1f83ff79d824d190d42746e19f2d2c1bc71c97 100644 (file)
@@ -195,6 +195,11 @@ int MyListAddReply::lid() const
        return m_lid;
 }
 
+bool MyListAddReply::stateSet() const
+{
+       return m_stateSet;
+}
+
 void MyListAddReply::setRawReply(ReplyCode replyCode, const QString &reply)
 {
        AbstractReply::setRawReply(replyCode, reply);
@@ -208,10 +213,12 @@ void MyListAddReply::setRawReply(ReplyCode replyCode, const QString &reply)
                        {
                                m_lid = lid.toInt();
                        }
+                       m_stateSet = true;
                        signalReplyReady(true);
                }
                break;
                case MYLIST_ENTRY_EDITED:
+                       m_stateSet = true;
                        signalReplyReady(true);
                break;
                case FILE_ALREADY_IN_MYLIST:
@@ -235,6 +242,7 @@ void MyListAddReply::setRawReply(ReplyCode replyCode, const QString &reply)
 void MyListAddReply::init()
 {
        m_lid = 0;
+       m_stateSet = false;
 }
 
 } // namespace AniDBUdpClient
index 463da323cb2876f2477b2a26e116c172ab6ed095..637635e6b46410db571cd4ea83317fda397394bb 100644 (file)
@@ -79,6 +79,7 @@ class ANIDBUDPCLIENTSHARED_EXPORT MyListAddReply : public AbstractReply
 
 public:
        int lid() const;
+       bool stateSet() const;
 
        void setRawReply(ReplyCode replyCode, const QString &reply);
 
@@ -86,6 +87,7 @@ private:
        void init();
 
        int m_lid;
+       bool m_stateSet;
 };
 
 } // namespace AniDBUdpClient