From 034ce16c9afc6715881b78710fb4c896297fc433 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 18 Jul 2012 11:42:38 +0200 Subject: use centrally-defined ns_private --- src/client/QXmppBookmarkManager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/client/QXmppBookmarkManager.cpp') diff --git a/src/client/QXmppBookmarkManager.cpp b/src/client/QXmppBookmarkManager.cpp index dbeb3986..1eaa139e 100644 --- a/src/client/QXmppBookmarkManager.cpp +++ b/src/client/QXmppBookmarkManager.cpp @@ -26,11 +26,10 @@ #include "QXmppBookmarkManager.h" #include "QXmppBookmarkSet.h" #include "QXmppClient.h" +#include "QXmppConstants.h" #include "QXmppIq.h" #include "QXmppUtils.h" -static const char * ns_private_storage = "jabber:iq:private"; - // The QXmppPrivateStorageIq class represents an XML private storage IQ // as defined by XEP-0049: Private XML Storage. // @@ -65,7 +64,7 @@ void QXmppPrivateStorageIq::setBookmarks(const QXmppBookmarkSet &bookmarks) bool QXmppPrivateStorageIq::isPrivateStorageIq(const QDomElement &element) { const QDomElement queryElement = element.firstChildElement("query"); - return queryElement.namespaceURI() == ns_private_storage && + return queryElement.namespaceURI() == ns_private && QXmppBookmarkSet::isBookmarkSet(queryElement.firstChildElement()); } @@ -78,7 +77,7 @@ void QXmppPrivateStorageIq::parseElementFromChild(const QDomElement &element) void QXmppPrivateStorageIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); - writer->writeAttribute("xmlns", ns_private_storage); + writer->writeAttribute("xmlns", ns_private); m_bookmarks.toXml(writer); writer->writeEndElement(); } -- cgit v1.2.3