Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneypayee.cpp
Context not available. | |||||
38 | MyMoneyPayee MyMoneyPayee::null; | 38 | MyMoneyPayee MyMoneyPayee::null; | ||
---|---|---|---|---|---|
39 | 39 | | |||
40 | MyMoneyPayee::MyMoneyPayee() : | 40 | MyMoneyPayee::MyMoneyPayee() : | ||
41 | d_ptr(new MyMoneyPayeePrivate) | 41 | MyMoneyObject(*new MyMoneyPayeePrivate) | ||
42 | { | 42 | { | ||
43 | } | 43 | } | ||
44 | 44 | | |||
Context not available. | |||||
49 | const QString& postcode, | 49 | const QString& postcode, | ||
50 | const QString& telephone, | 50 | const QString& telephone, | ||
51 | const QString& email) : | 51 | const QString& email) : | ||
52 | d_ptr(new MyMoneyPayeePrivate) | 52 | MyMoneyObject(*new MyMoneyPayeePrivate) | ||
53 | { | 53 | { | ||
54 | Q_D(MyMoneyPayee); | 54 | Q_D(MyMoneyPayee); | ||
55 | d->m_name = name; | 55 | d->m_name = name; | ||
Context not available. | |||||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | MyMoneyPayee::MyMoneyPayee(const QDomElement& node) : | 67 | MyMoneyPayee::MyMoneyPayee(const QDomElement& node) : | ||
68 | MyMoneyObject(node), | 68 | MyMoneyObject(*new MyMoneyPayeePrivate, node) | ||
69 | d_ptr(new MyMoneyPayeePrivate) | | |||
70 | { | 69 | { | ||
71 | if (nodeNames[nnPayee] != node.tagName()) { | 70 | if (nodeNames[nnPayee] != node.tagName()) { | ||
72 | throw MYMONEYEXCEPTION("Node was not PAYEE"); | 71 | throw MYMONEYEXCEPTION("Node was not PAYEE"); | ||
Context not available. | |||||
110 | } | 109 | } | ||
111 | 110 | | |||
112 | MyMoneyPayee::MyMoneyPayee(const MyMoneyPayee& other) : | 111 | MyMoneyPayee::MyMoneyPayee(const MyMoneyPayee& other) : | ||
113 | MyMoneyObject(other.id()), | 112 | MyMoneyObject(*new MyMoneyPayeePrivate(*other.d_func()), other.id()), | ||
114 | MyMoneyPayeeIdentifierContainer(other), | 113 | MyMoneyPayeeIdentifierContainer(other) | ||
115 | d_ptr(new MyMoneyPayeePrivate(*other.d_func())) | | |||
116 | { | 114 | { | ||
117 | } | 115 | } | ||
118 | 116 | | |||
119 | MyMoneyPayee::MyMoneyPayee(const QString& id, const MyMoneyPayee& other) : | 117 | MyMoneyPayee::MyMoneyPayee(const QString& id, const MyMoneyPayee& other) : | ||
120 | MyMoneyObject(id), | 118 | MyMoneyObject(*new MyMoneyPayeePrivate(*other.d_func()), id), | ||
121 | MyMoneyPayeeIdentifierContainer(other), | 119 | MyMoneyPayeeIdentifierContainer(other) | ||
122 | d_ptr(new MyMoneyPayeePrivate(*other.d_func())) | | |||
123 | { | 120 | { | ||
124 | } | 121 | } | ||
125 | 122 | | |||
126 | MyMoneyPayee::~MyMoneyPayee() | 123 | MyMoneyPayee::~MyMoneyPayee() | ||
127 | { | 124 | { | ||
128 | Q_D(MyMoneyPayee); | | |||
129 | delete d; | | |||
130 | } | 125 | } | ||
131 | 126 | | |||
132 | bool MyMoneyPayee::operator == (const MyMoneyPayee& right) const | 127 | bool MyMoneyPayee::operator == (const MyMoneyPayee& right) const | ||
Context not available. | |||||
166 | { | 161 | { | ||
167 | auto el = document.createElement(nodeNames[nnPayee]); | 162 | auto el = document.createElement(nodeNames[nnPayee]); | ||
168 | 163 | | |||
169 | writeBaseXML(document, el); | | |||
170 | | ||||
171 | Q_D(const MyMoneyPayee); | 164 | Q_D(const MyMoneyPayee); | ||
165 | d->writeBaseXML(document, el); | ||||
166 | | ||||
172 | el.setAttribute(d->getAttrName(Payee::Attribute::Name), d->m_name); | 167 | el.setAttribute(d->getAttrName(Payee::Attribute::Name), d->m_name); | ||
173 | el.setAttribute(d->getAttrName(Payee::Attribute::Reference), d->m_reference); | 168 | el.setAttribute(d->getAttrName(Payee::Attribute::Reference), d->m_reference); | ||
174 | el.setAttribute(d->getAttrName(Payee::Attribute::Email), d->m_email); | 169 | el.setAttribute(d->getAttrName(Payee::Attribute::Email), d->m_email); | ||
Context not available. |