summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-12 22:58:46 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-12 22:58:46 +0800
commit4596650f165bca13107825bd5613e74f6afa8938 (patch)
treea5459de923c75486ffd87b536aadf7e1d022b7ad
parentf94f1928980c7d3100b83e5d8394561cb986ccd5 (diff)
Remove dummy task
-rw-r--r--tasklist.hxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/tasklist.hxx b/tasklist.hxx
index adece4d..a632d86 100644
--- a/tasklist.hxx
+++ b/tasklist.hxx
@@ -6,9 +6,9 @@
class Task
{
public:
- Task(unsigned int id, QString subject) :
- m_id{id},
- m_subject{subject}
+ Task(unsigned int id, QString subject)
+ : m_id{id}
+ , m_subject{subject}
{}
unsigned int id() const { return m_id; }
QString const& subject() const { return m_subject; }
@@ -28,10 +28,8 @@ class TaskList : public QAbstractListModel
IdRole = Qt::UserRole + 1,
SubjectRole
};
- explicit TaskList(QObject* parent = nullptr) : QAbstractListModel{parent}
- {
- addTask(Task{1, "Task 1"});
- }
+ explicit TaskList(QObject* parent = nullptr)
+ : QAbstractListModel{parent} {}
int rowCount(QModelIndex const& parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;