diff options
author | Louie S <louie@example.com> | 2024-03-15 16:35:30 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-03-15 16:35:30 -0400 |
commit | 6c9d7e079cceade194b5faa6c65e98920be697ef (patch) | |
tree | 5af2be170449822320b3b4f1a873a9dc1dde10eb /src/entryLayout.cpp | |
parent | 4c2c8bc81df55ab2f0112d16bfd1a9d236b51e6d (diff) |
sorting implemented; functionality is now matching pyqt version
Diffstat (limited to 'src/entryLayout.cpp')
-rw-r--r-- | src/entryLayout.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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<Rule *> rules = this->loadRules(); + QList<Rule> 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<Rule *> EntryLayout::loadRules() { +QList<Rule> EntryLayout::loadRules() { BackendDB database; return database.loadRules(this->entry.id); |