BufferViewOverlay now correctly respects filtering of buffer types
[quassel.git] / src / uisupport / flatproxymodel.cpp
index ef19074..19f543b 100644 (file)
@@ -506,7 +506,7 @@ void FlatProxyModel::on_rowsAboutToBeRemoved(const QModelIndex &parent, int star
   // sanity check - if that check fails our indexes would be messed up
   for(int row = start; row <= end; row++) {
     if(sourceItem->child(row)->childCount() > 0) {
-      qWarning() << "on_rowsAboutToBeRemoved(): sourceModel() removed rows which have childs on their own!" << sourceModel()->index(row, 0, parent);
+      qWarning() << "on_rowsAboutToBeRemoved(): sourceModel() removed rows which have children on their own!" << sourceModel()->index(row, 0, parent);
       Q_ASSERT(false);
     }
   }
@@ -518,12 +518,13 @@ void FlatProxyModel::on_rowsInserted(const QModelIndex &parent, int start, int e
 
   SourceItem *sourceItem = sourceToInternal(parent);
   Q_ASSERT(sourceItem);
+  Q_UNUSED(sourceItem);
 
   // sanity check - if that check fails our indexes would be messed up
   for(int row = start; row <= end; row++) {
     QModelIndex child = sourceModel()->index(row, 0, parent);
     if(sourceModel()->rowCount(child) > 0) {
-      qWarning() << "on_rowsInserted(): sourceModel() inserted rows which already have childs on their own!" << child;
+      qWarning() << "on_rowsInserted(): sourceModel() inserted rows which already have children on their own!" << child;
       Q_ASSERT(false);
     }
   }
@@ -592,6 +593,7 @@ void FlatProxyModel::linkTest() const {
   }
   qDebug() << "Last item in tree:" << item << item->pos();
   Q_ASSERT(lastPos == item->pos());
+  Q_UNUSED(lastPos);
 
   qDebug() << "success!";
 }
@@ -652,7 +654,7 @@ FlatProxyModel::SourceItem *FlatProxyModel::SourceItem::findChild(int proxyPos)
   int start = 0;
   int end = _childs.count() - 1;
   int pivot;
-  while(end - start != 1) {
+  while(end - start > 1) {
     pivot = (end + start) / 2;
     if(_childs[pivot]->pos() > proxyPos)
       end = pivot;