Browse Source

Renamed question to query

develop
Robin Thoni 6 years ago
parent
commit
e2805b9e9b

+ 3
- 3
src/modules/dns/includes/dns/QDnsHeader.h View File

@@ -61,8 +61,8 @@ namespace QDns
61 61
         void setReplyCode(quint8 replyCode);
62 62
 
63 63
 
64
-        quint16 getQuestionCount() const;
65
-        void setQuestionCount(quint16 questionCount);
64
+        quint16 getQueryCount() const;
65
+        void setQueryCount(quint16 questionCount);
66 66
 
67 67
         quint16 getAnswerCount() const;
68 68
         void setAnswerCount(quint16 answerCount);
@@ -77,7 +77,7 @@ namespace QDns
77 77
         bool m_isValid;
78 78
         quint16 m_id;
79 79
         quint16 m_flags;
80
-        quint16 m_questionCount;
80
+        quint16 m_queryCount;
81 81
         quint16 m_answerCount;
82 82
         quint16 m_authorityCount;
83 83
         quint16 m_additionalCount;

+ 7
- 7
src/modules/dns/src/QDnsHeader.cpp View File

@@ -12,7 +12,7 @@ namespace QDns
12 12
             : m_isValid(true)
13 13
             , m_id(0)
14 14
             , m_flags(0)
15
-            , m_questionCount(0)
15
+            , m_queryCount(0)
16 16
             , m_answerCount(0)
17 17
             , m_authorityCount(0)
18 18
             , m_additionalCount(0)
@@ -38,7 +38,7 @@ namespace QDns
38 38
         {
39 39
             dataStream >> header.m_id;
40 40
             dataStream >> header.m_flags;
41
-            dataStream >> header.m_questionCount;
41
+            dataStream >> header.m_queryCount;
42 42
             dataStream >> header.m_answerCount;
43 43
             dataStream >> header.m_authorityCount;
44 44
             dataStream >> header.m_additionalCount;
@@ -59,7 +59,7 @@ namespace QDns
59 59
     {
60 60
         dataStream << m_id;
61 61
         dataStream << m_flags;
62
-        dataStream << m_questionCount;
62
+        dataStream << m_queryCount;
63 63
         dataStream << m_answerCount;
64 64
         dataStream << m_authorityCount;
65 65
         dataStream << m_additionalCount;
@@ -213,14 +213,14 @@ namespace QDns
213 213
         setFlagBits(15, (quint8) replyCode, 4);
214 214
     }
215 215
 
216
-    quint16 QDnsHeader::getQuestionCount() const
216
+    quint16 QDnsHeader::getQueryCount() const
217 217
     {
218
-        return m_questionCount;
218
+        return m_queryCount;
219 219
     }
220 220
 
221
-    void QDnsHeader::setQuestionCount(quint16 questionCount)
221
+    void QDnsHeader::setQueryCount(quint16 questionCount)
222 222
     {
223
-        m_questionCount = questionCount;
223
+        m_queryCount = questionCount;
224 224
     }
225 225
 
226 226
     quint16 QDnsHeader::getAnswerCount() const

+ 6
- 6
tests/DnsHeader.cpp View File

@@ -26,7 +26,7 @@ struct DnsHeaderTestParams
26 26
     bool flagNonAuthenticatedAcceptable;
27 27
     quint8 flagReplyCode;
28 28
 
29
-    quint16 questionCount;
29
+    quint16 queryCount;
30 30
     quint16 answerCount;
31 31
     quint16 authorityCount;
32 32
     quint16 additionalCount;
@@ -58,7 +58,7 @@ TEST_P(DnsHeaderTest, parseAndGetters)
58 58
         ASSERT_EQ(header.isNonAuthenticatedAcceptable(), params.flagNonAuthenticatedAcceptable);
59 59
         ASSERT_EQ(header.getReplyCode(), params.flagReplyCode);
60 60
 
61
-        ASSERT_EQ(header.getQuestionCount(), params.questionCount);
61
+        ASSERT_EQ(header.getQueryCount(), params.queryCount);
62 62
         ASSERT_EQ(header.getAnswerCount(), params.answerCount);
63 63
         ASSERT_EQ(header.getAuthorityCount(), params.authorityCount);
64 64
         ASSERT_EQ(header.getAdditionalCount(), params.additionalCount);
@@ -81,7 +81,7 @@ TEST_P(DnsHeaderTest, settersAndGetters1)
81 81
 
82 82
     header.setId(params.id);
83 83
     header.setFlags(params.flags);
84
-    header.setQuestionCount(params.questionCount);
84
+    header.setQueryCount(params.queryCount);
85 85
     header.setAnswerCount(params.answerCount);
86 86
     header.setAuthorityCount(params.authorityCount);
87 87
     header.setAdditionalCount(params.additionalCount);
@@ -99,7 +99,7 @@ TEST_P(DnsHeaderTest, settersAndGetters1)
99 99
     ASSERT_EQ(header.isNonAuthenticatedAcceptable(), params.flagNonAuthenticatedAcceptable);
100 100
     ASSERT_EQ(header.getReplyCode(), params.flagReplyCode);
101 101
 
102
-    ASSERT_EQ(header.getQuestionCount(), params.questionCount);
102
+    ASSERT_EQ(header.getQueryCount(), params.queryCount);
103 103
     ASSERT_EQ(header.getAnswerCount(), params.answerCount);
104 104
     ASSERT_EQ(header.getAuthorityCount(), params.authorityCount);
105 105
     ASSERT_EQ(header.getAdditionalCount(), params.additionalCount);
@@ -130,7 +130,7 @@ TEST_P(DnsHeaderTest, settersAndGetters2)
130 130
     header.setIsAnswerAuthenticated(params.flagAnswerAuthenticated);
131 131
     header.setNonAuthenticatedAcceptable(params.flagNonAuthenticatedAcceptable);
132 132
     header.setReplyCode(params.flagReplyCode);
133
-    header.setQuestionCount(params.questionCount);
133
+    header.setQueryCount(params.queryCount);
134 134
     header.setAnswerCount(params.answerCount);
135 135
     header.setAuthorityCount(params.authorityCount);
136 136
     header.setAdditionalCount(params.additionalCount);
@@ -148,7 +148,7 @@ TEST_P(DnsHeaderTest, settersAndGetters2)
148 148
     ASSERT_EQ(header.isNonAuthenticatedAcceptable(), params.flagNonAuthenticatedAcceptable);
149 149
     ASSERT_EQ(header.getReplyCode(), params.flagReplyCode);
150 150
 
151
-    ASSERT_EQ(header.getQuestionCount(), params.questionCount);
151
+    ASSERT_EQ(header.getQueryCount(), params.queryCount);
152 152
     ASSERT_EQ(header.getAnswerCount(), params.answerCount);
153 153
     ASSERT_EQ(header.getAuthorityCount(), params.authorityCount);
154 154
     ASSERT_EQ(header.getAdditionalCount(), params.additionalCount);

Loading…
Cancel
Save