From 4596650f165bca13107825bd5613e74f6afa8938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Thu, 12 Sep 2019 22:58:46 +0800 Subject: Remove dummy task --- tasklist.hxx | 12 +++++------- 1 file 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; -- cgit v1.2.3