Prepare for XML storage separation
ClosedPublic

Authored by wojnilowicz on Jun 17 2018, 1:12 PM.

Details

Summary

Goal of this patch is to facilitate separation of XML saving and reading methods to XML storage plugin by:

  1. adding new constructor for MyMoneyObjects

The new constructor accepts id, so an MyMoney object will be created in XML storage plugin at the spot and not by a copy from another object. That's one constructor more for every MyMoneyObject, but there will be one constructor (the one with QDomElement) less after complete encapsulation of XML support in KMyMoney

  1. moving all remaining enums to mymoneyenums

Some enums were changed to enum class, so type safety is enhanced a little bit.

Test Plan

All tests pass.

Diff Detail

Repository
R261 KMyMoney
Lint
Lint Skipped
Unit
Unit Tests Skipped
wojnilowicz requested review of this revision.Jun 17 2018, 1:12 PM
wojnilowicz created this revision.
tbaumgart requested changes to this revision.Jun 24 2018, 8:30 PM
tbaumgart added inline comments.
kmymoney/mymoney/mymoneyschedule.cpp
775

You must not provide visibility of internals. This method is not allowed and has to be removed. A user of MyMoneySchedule has to use transaction() and setTransaction() to modify the transaction inside the schedule.

Don't overoptimize and risk safety. Given the number of schedules to load this is just not worth it.

This revision now requires changes to proceed.Jun 24 2018, 8:30 PM
wojnilowicz marked an inline comment as done.
tbaumgart accepted this revision.Jun 25 2018, 6:17 AM
This revision is now accepted and ready to land.Jun 25 2018, 6:17 AM
wojnilowicz closed this revision.Jun 26 2018, 3:38 PM