From f38253b159f7cbb4bc2c9990d76255d167d3af7b Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 6 Feb 2012 17:20:30 +0000 Subject: make some methods const (issue #121) --- src/QXmppStanza.cpp | 4 ++-- src/QXmppStanza.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/QXmppStanza.cpp b/src/QXmppStanza.cpp index bec4eee3..e8937b6f 100644 --- a/src/QXmppStanza.cpp +++ b/src/QXmppStanza.cpp @@ -233,7 +233,7 @@ void QXmppStanza::Error::setConditionFromStr(const QString& type) setCondition(static_cast(-1)); } -bool QXmppStanza::Error::isValid() +bool QXmppStanza::Error::isValid() const { return !(getTypeStr().isEmpty() && getConditionStr().isEmpty()); } @@ -417,7 +417,7 @@ void QXmppStanza::generateAndSetNextId() m_id = "qxmpp" + QString::number(s_uniqeIdNo); } -bool QXmppStanza::isErrorStanza() +bool QXmppStanza::isErrorStanza() const { return m_error.isValid(); } diff --git a/src/QXmppStanza.h b/src/QXmppStanza.h index 6a940ce4..dc1c1346 100644 --- a/src/QXmppStanza.h +++ b/src/QXmppStanza.h @@ -99,7 +99,7 @@ public: Type type() const; // FIXME : remove this once is gone - bool isValid(); + bool isValid() const; /// \cond void parse(const QDomElement &element); @@ -142,7 +142,7 @@ public: /// \cond // FIXME : why is this needed? - bool isErrorStanza(); + bool isErrorStanza() const; protected: void generateAndSetNextId(); -- cgit v1.2.3