X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatlinemodelitem.cpp;h=a3de834a11717a31e75ff935c8ffa5200d0456a4;hp=7d6e832785aa805c8997daf806ba3750e86c74d6;hb=1566f62849f9011656d9111b99f023d694bb8805;hpb=f824db0e31b54969e0b7fa0b5405b1e9173d482c diff --git a/src/qtui/chatlinemodelitem.cpp b/src/qtui/chatlinemodelitem.cpp index 7d6e8327..a3de834a 100644 --- a/src/qtui/chatlinemodelitem.cpp +++ b/src/qtui/chatlinemodelitem.cpp @@ -97,7 +97,7 @@ QVariant ChatLineModelItemPrivate::data(MessageModel::ColumnType column, int rol case ChatLineModel::DisplayRole: return _styledMsg->decoratedSender(); case ChatLineModel::EditRole: - return _styledMsg->sender(); + return _styledMsg->plainSender(); case ChatLineModel::FormatRole: return QVariant::fromValue(UiStyle::FormatList() << qMakePair((quint16)0, (quint32)_styledMsg->senderFormat())); @@ -107,7 +107,7 @@ QVariant ChatLineModelItemPrivate::data(MessageModel::ColumnType column, int rol switch(role) { case ChatLineModel::DisplayRole: case ChatLineModel::EditRole: - return _styledMsg->contents(); + return _styledMsg->plainContents(); case ChatLineModel::FormatRole: return QVariant::fromValue(_styledMsg->contentsFormatList()); case ChatLineModel::WrapListRole: @@ -124,7 +124,8 @@ QVariant ChatLineModelItemPrivate::data(MessageModel::ColumnType column, int rol } void ChatLineModelItemPrivate::style() { - _styledMsg = new QtUiStyle::StyledMessage(QtUi::style()->styleMessage(*_msgBuffer)); + _styledMsg = new QtUiStyle::StyledMessage(*_msgBuffer); + _styledMsg->style(QtUi::style()); delete _msgBuffer; _msgBuffer = 0; } @@ -215,6 +216,12 @@ ChatLineModelItem::ChatLineModelItem(const Message &msg) { } +ChatLineModelItem::ChatLineModelItem(const ChatLineModelItem &other) + : MessageModelItem(other) +{ + _data = new ChatLineModelItemPrivate(message()); +} + ChatLineModelItem::~ChatLineModelItem() { delete _data; }