Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/onlinejob.cpp
Context not available. | |||||
32 | using namespace MyMoneyStorageNodes; | 32 | using namespace MyMoneyStorageNodes; | ||
---|---|---|---|---|---|
33 | 33 | | |||
34 | onlineJob::onlineJob() : | 34 | onlineJob::onlineJob() : | ||
35 | MyMoneyObject(), | 35 | MyMoneyObject(*new onlineJobPrivate), | ||
36 | d_ptr(new onlineJobPrivate), | | |||
37 | m_task(0) | 36 | m_task(0) | ||
38 | { | 37 | { | ||
39 | Q_D(onlineJob); | 38 | Q_D(onlineJob); | ||
Context not available. | |||||
45 | } | 44 | } | ||
46 | 45 | | |||
47 | onlineJob::onlineJob(onlineTask* task, const QString &id) : | 46 | onlineJob::onlineJob(onlineTask* task, const QString &id) : | ||
48 | MyMoneyObject(id), | 47 | MyMoneyObject(*new onlineJobPrivate, id), | ||
49 | d_ptr(new onlineJobPrivate), | | |||
50 | m_task(task) | 48 | m_task(task) | ||
51 | { | 49 | { | ||
52 | Q_D(onlineJob); | 50 | Q_D(onlineJob); | ||
Context not available. | |||||
58 | } | 56 | } | ||
59 | 57 | | |||
60 | onlineJob::onlineJob(onlineTask* task) : | 58 | onlineJob::onlineJob(onlineTask* task) : | ||
61 | MyMoneyObject(MyMoneyObject::m_emptyId), | 59 | MyMoneyObject(*new onlineJobPrivate, QString()), | ||
62 | d_ptr(new onlineJobPrivate), | | |||
63 | m_task(task) | 60 | m_task(task) | ||
64 | { | 61 | { | ||
65 | Q_D(onlineJob); | 62 | Q_D(onlineJob); | ||
Context not available. | |||||
71 | } | 68 | } | ||
72 | 69 | | |||
73 | onlineJob::onlineJob(onlineJob const& other) : | 70 | onlineJob::onlineJob(onlineJob const& other) : | ||
74 | MyMoneyObject(other.id()), | 71 | MyMoneyObject(*new onlineJobPrivate(*other.d_func()), other.id()), | ||
75 | d_ptr(new onlineJobPrivate(*other.d_func())), | | |||
76 | m_task(0) | 72 | m_task(0) | ||
77 | { | 73 | { | ||
78 | copyPointerFromOtherJob(other); | 74 | copyPointerFromOtherJob(other); | ||
79 | } | 75 | } | ||
80 | 76 | | |||
81 | onlineJob::onlineJob(const QString &id, const onlineJob& other) : | 77 | onlineJob::onlineJob(const QString &id, const onlineJob& other) : | ||
82 | MyMoneyObject(id), | 78 | MyMoneyObject(*new onlineJobPrivate(*other.d_func()), id), | ||
83 | d_ptr(new onlineJobPrivate(*other.d_func())), | | |||
84 | m_task() | 79 | m_task() | ||
85 | { | 80 | { | ||
86 | Q_D(onlineJob); | 81 | Q_D(onlineJob); | ||
Context not available. | |||||
93 | } | 88 | } | ||
94 | 89 | | |||
95 | onlineJob::onlineJob(const QDomElement& element) : | 90 | onlineJob::onlineJob(const QDomElement& element) : | ||
96 | MyMoneyObject(element, true), | 91 | MyMoneyObject(*new onlineJobPrivate, element, true) | ||
97 | d_ptr(new onlineJobPrivate) | | |||
98 | { | 92 | { | ||
99 | Q_D(onlineJob); | 93 | Q_D(onlineJob); | ||
100 | d->m_messageList = QList<onlineJobMessage>(); | 94 | d->m_messageList = QList<onlineJobMessage>(); | ||
Context not available. | |||||
135 | 129 | | |||
136 | onlineJob::~onlineJob() | 130 | onlineJob::~onlineJob() | ||
137 | { | 131 | { | ||
138 | Q_D(onlineJob); | | |||
139 | delete d; | | |||
140 | delete m_task; | 132 | delete m_task; | ||
141 | } | 133 | } | ||
142 | 134 | | |||
Context not available. | |||||
280 | /** @todo give life */ | 272 | /** @todo give life */ | ||
281 | void onlineJob::writeXML(QDomDocument &document, QDomElement &parent) const | 273 | void onlineJob::writeXML(QDomDocument &document, QDomElement &parent) const | ||
282 | { | 274 | { | ||
283 | QDomElement el = document.createElement(nodeNames[nnOnlineJob]); | 275 | auto el = document.createElement(nodeNames[nnOnlineJob]); | ||
284 | writeBaseXML(document, el); | | |||
285 | | ||||
286 | 276 | | |||
287 | Q_D(const onlineJob); | 277 | Q_D(const onlineJob); | ||
278 | d->writeBaseXML(document, el); | ||||
279 | | ||||
288 | if (!d->m_jobSend.isNull()) | 280 | if (!d->m_jobSend.isNull()) | ||
289 | el.setAttribute(d->getAttrName(OnlineJob::Attribute::Send), d->m_jobSend.toString(Qt::ISODate)); | 281 | el.setAttribute(d->getAttrName(OnlineJob::Attribute::Send), d->m_jobSend.toString(Qt::ISODate)); | ||
290 | if (!d->m_jobBankAnswerDate.isNull()) | 282 | if (!d->m_jobBankAnswerDate.isNull()) | ||
Context not available. |