summaryrefslogtreecommitdiffstats
path: root/src/shared/networkmessage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/networkmessage.h')
-rw-r--r--src/shared/networkmessage.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/networkmessage.h b/src/shared/networkmessage.h
index 290e3b5..c072070 100644
--- a/src/shared/networkmessage.h
+++ b/src/shared/networkmessage.h
@@ -67,9 +67,9 @@ public:
bool writeMessage(QAbstractSocket * const socket);
bool writeMessage(QUdpSocket* socket, const QHostAddress& address, quint16 port);
void reset() { _fields.clear(); _bufferSize = 0; _mode = 0; }
- const bool readComplete() const { return _mode == 3; }
- const bool writeComplete() const { return _mode == 4; }
- const bool hasField(const QByteArray& key) const { return _fields.contains(key); }
+ bool readComplete() { return _mode == 3; }
+ bool writeComplete() { return _mode == 4; }
+ bool hasField(QByteArray& key) { return _fields.contains(key); }
const QString getFieldString(const QByteArray& key) const { return QString::fromUtf8(_fields.value(key)); }
const QByteArray getFieldBytes(const QByteArray& key) const { return _fields.value(key); }
void setField(const QByteArray& key, const QByteArray& value) { if (_mode == 1 || _mode == 2) qFatal("setField called in bad state."); _fields.insert(key, value); _mode = 0; }