Skip to content
Commit db6b3ec4 authored by Łukasz Wojniłowicz's avatar Łukasz Wojniłowicz
Browse files

Make view columns user selectable



Purpose of this patch is to speed up set up of accounts model. It
involves deduplication of data loaded into model, configuring columns to
be displayed and deferring load of data.
Changes:
1) Context menu per view for selecting columns to be displayed. Views
can have different columns set. If column isn't displayed in any view,
then it is released from AccountsModel thus freeing resources.
2) During KMM start only Account column is loaded. The rest is loaded on
demand.
3) Signals for views using KMyMoneyAccountTreeView are connected in
ctors of those views, so no need for proxy signals.
4) KAccountsView is loaded on demand just like other views.
5) Signals blocked in AccountsModel::load to not emit lots of
dataChanged signals.
6) AccountsModel::loadPreferredAccount for copying preferred account and
not recalculating it from the beginning.
7) QStandardItemModel::setChild instead of
QStandardItemModel::setData(index, value) to lessen overhead.
8) AccountsModel::setAccountData takes minimal arguments needed for
correctness.
9) AccountsModel::setAccountData can update data selectively thus
shortening time to update.
10) AccountsModel::Columns::*DisplayRole are useless (There is already
Qt::DisplayRole), so they were removed significantly.
11) AccountsModel::Columns::Account used instead of 0 for correctness.
12) KMyMoneyView::slotNetBalProChanged deduplicates common code from
views using KMyMoneyAccountTreeView

BUG:315747
BUG:346009
FIXED-IN:5.0

Signed-off-by: default avatarŁukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

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



Signed-off-by: default avatarŁukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
parent 747762d1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment