[EGD-3572] SettingsTable exchanged to Settings::Settings (#968)

[EGD-3572] Application has an instance of Settings - removed from derived apps
[EGD-3572] review issues resolved
[EGD-3572] shared_ptr -> unique_ptr
[EGD-3572] Primary Key for settings_tab:path
[EGD-3572] empty values handling
This commit is contained in:
RobertPiet
2020-11-18 10:40:29 +01:00
committed by GitHub
parent b117704345
commit f11bc1f0d0
40 changed files with 242 additions and 617 deletions

View File

@@ -7,6 +7,9 @@
#include "NotesModel.hpp"
#include "ListView.hpp"
#include <module-utils/Utils.hpp>
#include <module-services/service-db/agents/settings/SystemSettings.hpp>
NotesModel::NotesModel(app::Application *app) : DatabaseModel(app)
{}
@@ -47,12 +50,7 @@ gui::ListItem *NotesModel::getItem(gui::Order order)
{
std::shared_ptr<NotesRecord> note = getRecord(order);
SettingsRecord &settings = application->getSettings();
if (note == nullptr)
return nullptr;
gui::NotesItem *item = new gui::NotesItem(this, !settings.timeFormat12);
auto *item = new gui::NotesItem(this, !(application->isTimeFormat12()));
item->setNote(note);
return item;