From 6c9d7e079cceade194b5faa6c65e98920be697ef Mon Sep 17 00:00:00 2001 From: Louie S Date: Fri, 15 Mar 2024 16:35:30 -0400 Subject: sorting implemented; functionality is now matching pyqt version --- src/entryLayout.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/entryLayout.cpp') diff --git a/src/entryLayout.cpp b/src/entryLayout.cpp index 349a102..b3e742f 100644 --- a/src/entryLayout.cpp +++ b/src/entryLayout.cpp @@ -35,18 +35,18 @@ EntryLayout::EntryLayout(const Entry &e) : SLOT(showContextMenu())); // Check rules - QList rules = this->loadRules(); + QList rules = this->loadRules(); for(i = 0; i < rules.size(); ++i) { if( - (rules[i]->when == Rule::before && - rules[i]->date > QDateTime::currentDateTime()) || - (rules[i]->when == Rule::after && - rules[i]->date <= QDateTime::currentDateTime()) + (rules[i].when == Rule::before && + rules[i].date > QDateTime::currentDateTime()) || + (rules[i].when == Rule::after && + rules[i].date <= QDateTime::currentDateTime()) ) { - if(!rules[i]->color.isEmpty()) - this->entry.color = rules[i]->color; - if(!rules[i]->highlight.isEmpty()) - this->entry.highlight = rules[i]->highlight; + if(!rules[i].color.isEmpty()) + this->entry.color = rules[i].color; + if(!rules[i].highlight.isEmpty()) + this->entry.highlight = rules[i].highlight; } } @@ -101,7 +101,7 @@ EntryLayout::EntryLayout(const Entry &e) : this->addWidget(body); } -QList EntryLayout::loadRules() { +QList EntryLayout::loadRules() { BackendDB database; return database.loadRules(this->entry.id); -- cgit