From e60110ec2df2c8a50b3ad94fb10f9ec769225bc2 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Wed, 4 Feb 2009 16:07:31 +0100 Subject: [PATCH] fixes #437 - compiler warnings --- src/qtui/chatviewsearchcontroller.cpp | 8 ++++---- src/qtui/chatviewsearchcontroller.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qtui/chatviewsearchcontroller.cpp b/src/qtui/chatviewsearchcontroller.cpp index 997c1953..1290d657 100644 --- a/src/qtui/chatviewsearchcontroller.cpp +++ b/src/qtui/chatviewsearchcontroller.cpp @@ -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(); } diff --git a/src/qtui/chatviewsearchcontroller.h b/src/qtui/chatviewsearchcontroller.h index a119d541..adf1c969 100644 --- a/src/qtui/chatviewsearchcontroller.h +++ b/src/qtui/chatviewsearchcontroller.h @@ -110,7 +110,7 @@ private slots: private: QRectF _boundingRect; bool _highlighted; - qreal _alpha; + int _alpha; QTimeLine _timeLine; }; -- 2.20.1