bool IrcBufferPrivate::processMessage(IrcMessage* message) { Q_Q(IrcBuffer); bool processed = false; switch (message->type()) { case IrcMessage::Away: processed = processAwayMessage(static_cast<IrcAwayMessage*>(message)); break; case IrcMessage::Join: processed = processJoinMessage(static_cast<IrcJoinMessage*>(message)); break; case IrcMessage::Kick: processed = processKickMessage(static_cast<IrcKickMessage*>(message)); break; case IrcMessage::Mode: processed = processModeMessage(static_cast<IrcModeMessage*>(message)); break; case IrcMessage::Names: processed = processNamesMessage(static_cast<IrcNamesMessage*>(message)); break; case IrcMessage::Nick: processed = processNickMessage(static_cast<IrcNickMessage*>(message)); break; case IrcMessage::Notice: processed = processNoticeMessage(static_cast<IrcNoticeMessage*>(message)); if (processed) { activity = message->timeStamp(); IrcBufferModelPrivate::get(model)->promoteBuffer(q); } break; case IrcMessage::Numeric: processed = processNumericMessage(static_cast<IrcNumericMessage*>(message)); break; case IrcMessage::Part: processed = processPartMessage(static_cast<IrcPartMessage*>(message)); break; case IrcMessage::Private: processed = processPrivateMessage(static_cast<IrcPrivateMessage*>(message)); if (processed) { activity = message->timeStamp(); IrcBufferModelPrivate::get(model)->promoteBuffer(q); } break; case IrcMessage::Quit: processed = processQuitMessage(static_cast<IrcQuitMessage*>(message)); break; case IrcMessage::Topic: processed = processTopicMessage(static_cast<IrcTopicMessage*>(message)); break; case IrcMessage::WhoReply: processed = processWhoReplyMessage(static_cast<IrcWhoReplyMessage*>(message)); break; default: break; } if (processed) emit q->messageReceived(message); return processed; }
bool IrcBufferPrivate::processMessage(IrcMessage* message) { Q_Q(IrcBuffer); bool processed = false; switch (message->type()) { case IrcMessage::Join: processed = processJoinMessage(static_cast<IrcJoinMessage*>(message)); break; case IrcMessage::Kick: processed = processKickMessage(static_cast<IrcKickMessage*>(message)); break; case IrcMessage::Mode: processed = processModeMessage(static_cast<IrcModeMessage*>(message)); break; case IrcMessage::Names: processed = processNamesMessage(static_cast<IrcNamesMessage*>(message)); break; case IrcMessage::Nick: processed = processNickMessage(static_cast<IrcNickMessage*>(message)); break; case IrcMessage::Notice: processed = processNoticeMessage(static_cast<IrcNoticeMessage*>(message)); break; case IrcMessage::Numeric: processed = processNumericMessage(static_cast<IrcNumericMessage*>(message)); break; case IrcMessage::Part: processed = processPartMessage(static_cast<IrcPartMessage*>(message)); break; case IrcMessage::Private: processed = processPrivateMessage(static_cast<IrcPrivateMessage*>(message)); break; case IrcMessage::Quit: processed = processQuitMessage(static_cast<IrcQuitMessage*>(message)); break; case IrcMessage::Topic: processed = processTopicMessage(static_cast<IrcTopicMessage*>(message)); break; default: break; } if (processed) emit q->messageReceived(message); return processed; }