Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyinstitution.cpp
Context not available. | |||||
73 | MyMoneyKeyValueContainer(node.elementsByTagName(nodeNames[nnKeyValuePairs]).item(0).toElement()) | 73 | MyMoneyKeyValueContainer(node.elementsByTagName(nodeNames[nnKeyValuePairs]).item(0).toElement()) | ||
---|---|---|---|---|---|
74 | { | 74 | { | ||
75 | if (nodeNames[nnInstitution] != node.tagName()) | 75 | if (nodeNames[nnInstitution] != node.tagName()) | ||
76 | throw MYMONEYEXCEPTION("Node was not INSTITUTION"); | 76 | throw MYMONEYEXCEPTION_CSTRING("Node was not INSTITUTION"); | ||
77 | 77 | | |||
78 | Q_D(MyMoneyInstitution); | 78 | Q_D(MyMoneyInstitution); | ||
79 | d->m_sortcode = node.attribute(d->getAttrName(Institution::Attribute::SortCode)); | 79 | d->m_sortcode = node.attribute(d->getAttrName(Institution::Attribute::SortCode)); | ||
Context not available. | |||||
81 | d->m_manager = node.attribute(d->getAttrName(Institution::Attribute::Manager)); | 81 | d->m_manager = node.attribute(d->getAttrName(Institution::Attribute::Manager)); | ||
82 | 82 | | |||
83 | QDomNodeList nodeList = node.elementsByTagName(d->getElName(Institution::Element::Address)); | 83 | QDomNodeList nodeList = node.elementsByTagName(d->getElName(Institution::Element::Address)); | ||
84 | if (nodeList.count() == 0) { | 84 | if (nodeList.isEmpty()) | ||
85 | QString msg = QString("No ADDRESS in institution %1").arg(d->m_name); | 85 | throw MYMONEYEXCEPTION(QString::fromLatin1("No ADDRESS in institution %1").arg(d->m_name)); | ||
86 | throw MYMONEYEXCEPTION(msg); | | |||
87 | } | | |||
88 | 86 | | |||
89 | QDomElement addrNode = nodeList.item(0).toElement(); | 87 | QDomElement addrNode = nodeList.item(0).toElement(); | ||
90 | d->m_street = addrNode.attribute(d->getAttrName(Institution::Attribute::Street)); | 88 | d->m_street = addrNode.attribute(d->getAttrName(Institution::Attribute::Street)); | ||
Context not available. |