diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-06 12:03:43 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-09-06 12:03:43 +0800 |
commit | 7dadd495657a8baa67d26dcd6f961e1c523d2a2e (patch) | |
tree | 4e530d4b80be89a8fe4c6bbdb96405cfc96ae86c /tasklist.cxx | |
parent | 015650a6fadd2592100950c57146fcc5c61764a2 (diff) |
Task related views using the C++ model
Diffstat (limited to 'tasklist.cxx')
-rw-r--r-- | tasklist.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tasklist.cxx b/tasklist.cxx index 5850584..4810c5b 100644 --- a/tasklist.cxx +++ b/tasklist.cxx @@ -14,10 +14,10 @@ QVariant TaskList::data(QModelIndex const& index, int role) const auto task = tasks[row]; switch (role) { - case Task::IdRole: - return task.id; - case Task::SubjectRole: - return task.subject; + case IdRole: + return task.id(); + case SubjectRole: + return task.subject(); default: return QVariant(); } @@ -26,8 +26,8 @@ QVariant TaskList::data(QModelIndex const& index, int role) const QHash<int, QByteArray> TaskList::roleNames() const { return QHash<int, QByteArray>{ - {Task::IdRole, "id"}, - {Task::SubjectRole, "subject"} + {IdRole, "id"}, + {SubjectRole, "subject"} }; } |