-MessageModelItem *ChatLineModel::createMessageModelItem(const Message &msg) {
- return new ChatLineModelItem(msg);
+// MessageModelItem *ChatLineModel::createMessageModelItem(const Message &msg) {
+// return new ChatLineModelItem(msg);
+// }
+
+void ChatLineModel::insertMessages__(int pos, const QList<Message> &messages) {
+ for(int i = 0; i < messages.count(); i++) {
+ _messageList.insert(pos, ChatLineModelItem(messages[i]));
+ pos++;
+ }