Example #1
0
void StatusPreset::fromXml(const QDomElement &el)
{
    // FIXME: This is the old format. Should be removed in the future
    if (el.tagName() == "item") {
        setName(el.attribute("name"));
        setMessage(el.text());
        return;
    }

    if (el.isNull() || el.tagName() != "preset")
        return;

    setName(el.attribute("name"));
    setMessage(el.text());
    if (el.hasAttribute("priority"))
        setPriority(el.attribute("priority").toInt());

    XMPP::Status status;
    status.setType(el.attribute("status", "away"));
    setStatus(status.type());
}
Example #2
0
XMPP::Status::Type makeSTATUS(const XMPP::Status &s)
{
	return s.type();
}