More WiP stuff for the MessageModel.
[quassel.git] / src / qtui / chatline.cpp
index ef59fc4..c3e08b9 100644 (file)
 #include "chatline.h"
 
 Chatline::Chatline(const Message &msg) : MessageItem(msg) {
+  _msg = msg;
 
 
 }
 
 
 QVariant Chatline::data(int column, int role) const {
-  return MessageItem::data(column, role);
+  switch(role) {
+    case MessageModel::DisplayRole: return _msg.text();
+    default: return MessageItem::data(column, role);
+  }
 }
 
 bool Chatline::setData(int column, const QVariant &value, int role) {