hgcacheproxymodel/tsrc/unit/bmhelper.cpp
changeset 2 49c70dcc3f17
parent 1 e48454f237ca
child 3 c863538fcbb6
--- a/hgcacheproxymodel/tsrc/unit/bmhelper.cpp	Mon May 03 13:32:54 2010 +0300
+++ b/hgcacheproxymodel/tsrc/unit/bmhelper.cpp	Fri May 14 16:57:01 2010 +0300
@@ -36,7 +36,11 @@
         end = mBuffer.size() - 1;
     
     for ( int i = start; i <= end; i++){
-        mBuffer.replace(i, false);
+        if (mBuffer.value(i) == true){
+            mBuffer.replace(i, false);
+        } else {
+//            qWarning()<<QString("release released item %1").arg(i);
+        }
     }
 }
 
@@ -47,9 +51,13 @@
         start = 0;
     if (end>mBuffer.size() - 1)
         end = mBuffer.size() - 1;
-
+    
     for ( int i = start; i <= end; i++){
-        mBuffer.replace(i, true);
+        if (mBuffer.value(i) == false){
+            mBuffer.replace(i, true);
+        } else {
+//            qWarning()<<QString("request requested item %1").arg(i);
+        }
     }
 }