converted while to for loop

This commit is contained in:
Andreas Preikschat 2013-03-07 14:44:19 +01:00
parent bf02c4af34
commit 0c4df23a19

View File

@ -380,13 +380,11 @@ class MediaManagerItem(QtGui.QWidget):
""" """
Return the current list of files Return the current list of files
""" """
count = 0
file_list = [] file_list = []
while count < self.listView.count(): for index in xrange(self.listView.count()):
bitem = self.listView.item(count) bitem = self.listView.item(index)
filename = bitem.data(QtCore.Qt.UserRole) filename = bitem.data(QtCore.Qt.UserRole)
file_list.append(filename) file_list.append(filename)
count += 1
return file_list return file_list
def loadList(self, list): def loadList(self, list):