X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatviewsearchcontroller.cpp;h=c732486d01b7e502c82f61849e4db4558d4e17ce;hp=ab270a593a4d32548c4b0bf0a85a95c619243754;hb=3f354bcce2cecfe88a46de90cbf94ffd1bc7c506;hpb=99934fe47293f61e1e62ecc0f0d49f958a992c32 diff --git a/src/qtui/chatviewsearchcontroller.cpp b/src/qtui/chatviewsearchcontroller.cpp index ab270a59..c732486d 100644 --- a/src/qtui/chatviewsearchcontroller.cpp +++ b/src/qtui/chatviewsearchcontroller.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -190,8 +190,8 @@ void ChatViewSearchController::checkMessagesForHighlight(int start, int end) { index = model->index(row, 0); if(!checkType((Message::Type)index.data(MessageModel::TypeRole).toInt())) continue; - highlightLine(_scene->chatLine(row)); } + highlightLine(_scene->chatLine(row)); } } @@ -206,7 +206,7 @@ void ChatViewSearchController::updateHighlights(ChatLine *line) { QHash > wordRects; foreach(ChatItem *item, checkItems) { foreach(QRectF wordRect, item->findWords(searchString(), caseSensitive())) { - wordRects[wordRect.x() + item->x()][wordRect.y()] = wordRect; + wordRects[(quint64)(wordRect.x() + item->x())][(quint64)(wordRect.y())] = wordRect; } } @@ -225,8 +225,8 @@ void ChatViewSearchController::updateHighlights(ChatLine *line) { if(!highlightItem) continue; - if(!deleteAll && wordRects.contains(highlightItem->pos().x()) && wordRects[highlightItem->pos().x()].contains(highlightItem->pos().y())) { - QRectF &wordRect = wordRects[highlightItem->pos().x()][highlightItem->pos().y()]; + if(!deleteAll && wordRects.contains((quint64)(highlightItem->pos().x())) && wordRects[(quint64)(highlightItem->pos().x())].contains((quint64)(highlightItem->pos().y()))) { + QRectF &wordRect = wordRects[(quint64)(highlightItem->pos().x())][(quint64)(highlightItem->pos().y())]; highlightItem->updateGeometry(wordRect.width(), wordRect.height()); } else { int pos = _highlightItems.indexOf(highlightItem); @@ -384,7 +384,7 @@ void SearchHighlightItem::setHighlighted(bool highlighted) { } void SearchHighlightItem::updateHighlight(qreal value) { - _alpha = 100 + 155 * value; + _alpha = 100 + (int)(155 * value); update(); }