Applied project style to multiple files
This commit is contained in:
@@ -27,7 +27,7 @@ void AccountModel::getRowFromItem(const std::shared_ptr<Account> &item,
|
||||
int AccountModel::beforeInsert(const std::shared_ptr<Account> &item,
|
||||
std::vector<QStandardItem *> &row, int proposedIndex)
|
||||
{
|
||||
if (this->categoryCount[item->getCategory()]++ == 0) {
|
||||
if (this->categoryCount_[item->getCategory()]++ == 0) {
|
||||
auto row = this->createRow();
|
||||
|
||||
setStringItem(row[0], item->getCategory(), false, false);
|
||||
@@ -44,11 +44,11 @@ int AccountModel::beforeInsert(const std::shared_ptr<Account> &item,
|
||||
void AccountModel::afterRemoved(const std::shared_ptr<Account> &item,
|
||||
std::vector<QStandardItem *> &row, int index)
|
||||
{
|
||||
auto it = this->categoryCount.find(item->getCategory());
|
||||
assert(it != this->categoryCount.end());
|
||||
auto it = this->categoryCount_.find(item->getCategory());
|
||||
assert(it != this->categoryCount_.end());
|
||||
|
||||
if (it->second <= 1) {
|
||||
this->categoryCount.erase(it);
|
||||
this->categoryCount_.erase(it);
|
||||
this->removeCustomRow(index - 1);
|
||||
} else {
|
||||
it->second--;
|
||||
|
||||
Reference in New Issue
Block a user