fixes #437 - compiler warnings
authorMarcus Eggenberger <egs@quassel-irc.org>
Wed, 4 Feb 2009 15:07:31 +0000 (16:07 +0100)
committerMarcus Eggenberger <egs@quassel-irc.org>
Wed, 4 Feb 2009 15:07:35 +0000 (16:07 +0100)
src/qtui/chatviewsearchcontroller.cpp
src/qtui/chatviewsearchcontroller.h

index 997c195..1290d65 100644 (file)
@@ -206,7 +206,7 @@ void ChatViewSearchController::updateHighlights(ChatLine *line) {
   QHash<quint64, QHash<quint64, QRectF> > 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();
 }
 
index a119d54..adf1c96 100644 (file)
@@ -110,7 +110,7 @@ private slots:
 private:
   QRectF _boundingRect;
   bool _highlighted;
-  qreal _alpha;
+  int _alpha;
   QTimeLine _timeLine;
 };