X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatline-old.cpp;h=0a0d0dbcf6546edeec34e6e769fff9cbed5beeab;hb=2f11200e02c352180b1e7546ae1c88b08566275c;hp=32d46560ba69f4b3a472177a7b4f350424b79bce;hpb=70706ff642683d03ff091cab25d984ec7d9612de;p=quassel.git diff --git a/src/qtui/chatline-old.cpp b/src/qtui/chatline-old.cpp index 32d46560..0a0d0dbc 100644 --- a/src/qtui/chatline-old.cpp +++ b/src/qtui/chatline-old.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel IRC Development Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -21,11 +21,9 @@ #include "chatline-old.h" #include "qtui.h" -//!\brief Construct a ChatLine object from a message. +//! Construct a ChatLine object from a message. /** * \param m The message to be layouted and rendered - * \param net The network name - * \param buf The buffer name */ ChatLine::ChatLine(Message m) { hght = 0; @@ -135,8 +133,8 @@ void ChatLine::setSelection(SelectionMode mode, int start, int end) { } } -uint ChatLine::msgId() const { - return msg.buffer().uid(); +MsgId ChatLine::msgId() const { + return msg.msgId(); } BufferInfo ChatLine::bufferInfo() const { @@ -347,6 +345,7 @@ void ChatLine::draw(QPainter *p, const QPointF &pos) { } QPointF tpos = pos + QPointF(tsWidth + QtUi::style()->sepTsSender() + senderWidth + QtUi::style()->sepSenderText(), 0); qreal h = 0; int l = 0; + if(lineLayouts.count() == 0) return; // how can this happen? rect = QRectF(tpos + QPointF(0, h), QSizeF(textWidth, lineLayouts[l].height)); int offset = 0; foreach(FormatRange fr, textFormat) {