Note to all: Don't use dynamic_cast in modules that are used by
QuasselTopia. It's not supported on the greenphone.
}
void ChatWidget::prependMsg(AbstractUiMsg *msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
+ ChatLine *line = static_cast<ChatLine*>(msg);
Q_ASSERT(line);
prependChatLine(line);
}
void ChatWidget::appendMsg(AbstractUiMsg *msg) {
- ChatLine *line = dynamic_cast<ChatLine*>(msg);
+ ChatLine *line = static_cast<ChatLine*>(msg);
Q_ASSERT(line);
appendChatLine(line);
}
QList<ChatLine *> lines;
QList<AbstractUiMsg *> msgs = buf->contents();
foreach(AbstractUiMsg *msg, msgs) {
- lines.append(dynamic_cast<ChatLine*>(msg));
+ lines.append((ChatLine*)(msg));
}
chatWidget->setContents(lines);
connect(buf, SIGNAL(msgAppended(AbstractUiMsg *)), chatWidget, SLOT(appendMsg(AbstractUiMsg *)));