summaryrefslogtreecommitdiff
path: root/forummodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'forummodel.cpp')
-rw-r--r--forummodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/forummodel.cpp b/forummodel.cpp
index 73482e4..193df46 100644
--- a/forummodel.cpp
+++ b/forummodel.cpp
@@ -18,7 +18,7 @@ ForumModel::ForumModel(QObject *parent) :
roles[TopicTypeRole] = QByteArray("topicType");
roles[LastReplyTimeRole] = QByteArray("lastReplyTime");
roles[NumRepliesRole] = QByteArray("numReplies");
- roles[HumanDateRole] = QByteArray("humanDate");
+ roles[RelativeDateRole] = QByteArray("relativeDate");
roles[UnreadRole] = QByteArray("unread");
setRoleNames(roles);
}
@@ -99,14 +99,15 @@ QVariant ForumModel::data(const QModelIndex &index, int role) const
return _data[row].last_reply_time;
case NumRepliesRole:
return _data[row].num_replies;
- case HumanDateRole:
+ case RelativeDateRole:
switch (_data[row].type) {
case Board::Announcement:
return tr("Announcement");
case Board::Sticky:
return tr("Sticky");
default:
- return _board->renderHumanDate(_data[row].last_reply_time, true);
+ return _board->formatDateTime(_data[row].last_reply_time,
+ Board::RelativeDate);
}
case UnreadRole:
return _data[row].unread;