Don't try to mark all incoming messages with the Backlog flag
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 30 Jul 2009 19:21:44 +0000 (21:21 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 6 Aug 2009 18:25:58 +0000 (20:25 +0200)
This was an ugly workaround the need for which went away when BacklogManager was introduced.
Anyway, setData() with the FlagsRole was ignored by MessageModelItem...

src/qtui/mainwin.cpp

index 9ee56b8..8b76d0e 100644 (file)
@@ -944,8 +944,6 @@ void MainWin::messagesInserted(const QModelIndex &parent, int start, int end) {
     Message::Flags flags = (Message::Flags)idx.data(ChatLineModel::FlagsRole).toInt();
     if(flags.testFlag(Message::Backlog) || flags.testFlag(Message::Self))
       continue;
     Message::Flags flags = (Message::Flags)idx.data(ChatLineModel::FlagsRole).toInt();
     if(flags.testFlag(Message::Backlog) || flags.testFlag(Message::Self))
       continue;
-    flags |= Message::Backlog;  // we only want to trigger a highlight once!
-    Client::messageModel()->setData(idx, (int)flags, ChatLineModel::FlagsRole);
 
     BufferId bufId = idx.data(ChatLineModel::BufferIdRole).value<BufferId>();
     BufferInfo::Type bufType = Client::networkModel()->bufferType(bufId);
 
     BufferId bufId = idx.data(ChatLineModel::BufferIdRole).value<BufferId>();
     BufferInfo::Type bufType = Client::networkModel()->bufferType(bufId);