浏览代码

QCMakeCacheView: prever QVector over QList

Daniel Pfeifer 8 年之前
父节点
当前提交
1ffe47e37f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/QtDialog/QCMakeCacheView.cxx

+ 2 - 2
Source/QtDialog/QCMakeCacheView.cxx

@@ -429,7 +429,7 @@ QCMakePropertyList QCMakeCacheModel::properties() const
     return props;
   }
 
-  QList<QModelIndex> idxs;
+  QVector<QModelIndex> idxs;
   idxs.append(this->index(0, 0));
 
   // walk the entire model for property entries
@@ -454,7 +454,7 @@ QCMakePropertyList QCMakeCacheModel::properties() const
                (idxs.last().row() + 1) >= rowCount(idxs.last().parent()) ||
 #endif
                !idxs.last().sibling(idxs.last().row() + 1, 0).isValid())) {
-        idxs.removeLast();
+        idxs.remove(idxs.size() - 1);
       }
       if (!idxs.isEmpty()) {
         idxs.last() = idxs.last().sibling(idxs.last().row() + 1, 0);