Read and write only that what's necessary in MyMoneyReport::read and
MyMoneyReport::write.
Details
- Reviewers
tbaumgart - Group Reviewers
KMyMoney - Commits
- R261:b9cf11e9f84d: Categorize reports' data according to report types
Diff Detail
- Repository
- R261 KMyMoney
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
I believe yes, because it reads and writes only necessary data and 4.8 writes and reads all data. I assume that if 4.8 tries to load any unnecessary data, that 5.0 didn't write, nothing bad will happen. Nevertheless I wouldn't recommend returning to 4.8 once 5.0 saved an report.
Well, there is a comment at the beginning of MyMoneyReport::read(const QDomElement& e) which is left unchanged:
// The goal of this reading method is 100% backward AND 100% forward // compatibility. Any report ever created with any version of KMyMoney // should be able to be loaded by this method (as long as it's one of the // report types supported in this version, of course)
So we shall make sure that this still is the case. There might be other changes in 5.0 which do not allow to go back to 4.8, but we need to make sure the user knows about it. Believing is probably not good enough at this point. Double checking would be very much appreciated.
I analyzed the code and it's all about reading. If 4.8 tries to read something 5.0 didn't write, it will assign default parameter, which we don't care for, because it isn't necessary in this report.
In my opinion reports will be correctly read in 4.8 and 5.0 regardless of version in which they were saved.
I think that is good enough and matches my (code reading) findings. I am all for simplification.