Introduce equities and securities model
ClosedPublic

Authored by wojnilowicz on Aug 25 2017, 8:17 PM.

Details

Summary

Changes:

  1. equities and securities list aren't completely reloaded at each database change,
  2. displayed columns are selectable,
  3. no crash after deleting first equity (corner case),
  4. no crash after deleting equity in accounts view and then switching to investment view,
  5. context menu in equities tree updates properly when clicked on columns other than name,
  6. Call KMyMoneyApp::slotUpdateActions once instead of four times when selecting equity,
Test Plan

Creating, deleting, editing equity in accounts and investments view.
Modifying security in securities tab.
Buying shares in ledger.

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.
wojnilowicz created this revision.Aug 25 2017, 8:17 PM
tbaumgart added inline comments.
kmymoney/models/securitiesmodel.cpp
144

Couldn't you make m_columns a QVector? That would make initialization a lot easier.

170

Is the this pointer really needed here?

wojnilowicz marked 2 inline comments as done.Sep 3 2017, 8:26 AM
wojnilowicz added inline comments.
kmymoney/models/securitiesmodel.cpp
144

No, because m_columns isn't supposed to be fixed length. If length of QVector grows and there is no space immediate after it, then whole QVector needs to be moved to another continuous space.

170

It's not.

This revision was automatically updated to reflect the committed changes.
wojnilowicz marked 2 inline comments as done.