Refactor MyMoneySecurity

Authored by wojnilowicz on Oct 24 2017, 7:14 PM.

Description

Refactor MyMoneySecurity

The goal of this patch is to reduce dependability of mymoneysecurity on other libraries. The side goal is to imporve code readability.
Changes:

  1. moved method definitions outside of class declaration, so that available methods are easy to read,
  2. moved QString inline definitions into implementation, because their usefulness in header as non-POD accessors is arguable,
  3. changed return types of accessors from reference to value, as it allows to move QString dependency out of header and doesn't impact performance much because of implicit sharing/move semantics of QString
  4. removed Q_ENUMS as it was used only for testing purpose and didn't work with private enum class,
  5. created eMyMoney::Security enum so that other libraries can fetch less dependencies into their headers,
  6. no duplicated methods in kmymoneyutils; what did they do anyway there?

According to krazy2, mymoneysecurity should use d-pointer, but in my opinion it's pointless here because in case of new data member, there must be new public accessor as well, which would break binary compatibility anyways.

Differential Revision: https://phabricator.kde.org/D8505

Details

Committed
wojnilowiczOct 28 2017, 9:23 AM
Differential Revision
D8505: Refactor MyMoneySecurity
Parents
R261:e8d93ffbd849: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown