src/hbwidgets/itemviews/hbindexfeedback_p.cpp
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 7 923ff622b8b9
child 21 4633027730f5
child 34 ed14f46c0e55
--- a/src/hbwidgets/itemviews/hbindexfeedback_p.cpp	Thu Jul 15 14:03:49 2010 +0100
+++ b/src/hbwidgets/itemviews/hbindexfeedback_p.cpp	Thu Jul 22 16:36:53 2010 +0100
@@ -23,8 +23,8 @@
 **
 ****************************************************************************/
 
+#include "hbindexfeedback_p.h"
 #include "hbindexfeedback.h"
-#include "hbindexfeedback_p.h"
 
 #include <hbscrollbar.h>
 #include <hbabstractitemview.h>
@@ -133,6 +133,10 @@
         q, SLOT(_q_hideIndexFeedback()));
 
     createPrimitives();
+
+    // ensure that the index feedback is shown on top of the itemView in
+    // all cases. 
+    q->setZValue(1);
 }
 
 /*
@@ -189,7 +193,7 @@
 */
 QString HbIndexFeedbackPrivate::displayText(const QVariant &data) const
 {
-    QString retVal = QString();
+    QString retVal;
 
     switch (mIndexFeedbackPolicy) {
         case HbIndexFeedback::IndexFeedbackSingleCharacter:
@@ -418,7 +422,7 @@
         return;
     }
 
-    QRectF contentRect = mItemView->rect();
+    QRectF contentRect = mItemView->mapToItem(q, mItemView->rect()).boundingRect();
     
     HbScrollBar *verticalScrollBar = mItemView->verticalScrollBar();
     HbScrollBar *horizontalScrollBar = mItemView->horizontalScrollBar();
@@ -502,7 +506,7 @@
 {
     Q_Q( const HbIndexFeedback );
 
-    qreal retVal;
+    qreal retVal = 0.0;
 
     switch (mIndexFeedbackPolicy) {
         case HbIndexFeedback::IndexFeedbackNone: