Project/ProjectBrowserModel.py

changeset 1785
9c6d23391248
parent 1509
c0b5e693b0eb
child 2081
b7ccd563eeb6
child 2303
0ed4ed026c16
equal deleted inserted replaced
1782:90bd49fec9ff 1785:9c6d23391248
610 entryInfoList = qdir.entryInfoList(filter) 610 entryInfoList = qdir.entryInfoList(filter)
611 611
612 # step 1: check for new entries 612 # step 1: check for new entries
613 children = itm.children() 613 children = itm.children()
614 for f in entryInfoList: 614 for f in entryInfoList:
615 fpath = f.absoluteFilePath() 615 fpath = Utilities.toNativeSeparators(f.absoluteFilePath())
616 childFound = False 616 childFound = False
617 for child in children: 617 for child in children:
618 if child.name() == fpath: 618 if child.name() == fpath:
619 childFound = True 619 childFound = True
620 children.remove(child) 620 children.remove(child)
646 646
647 # step 2: check for removed entries 647 # step 2: check for removed entries
648 if len(entryInfoList) != itm.childCount(): 648 if len(entryInfoList) != itm.childCount():
649 for row in range(oldCnt - 1, -1, -1): 649 for row in range(oldCnt - 1, -1, -1):
650 child = itm.child(row) 650 child = itm.child(row)
651 childname = Utilities.fromNativeSeparators(child.name())
651 entryFound = False 652 entryFound = False
652 for f in entryInfoList: 653 for f in entryInfoList:
653 if f.absoluteFilePath() == child.name(): 654 if f.absoluteFilePath() == childname:
654 entryFound = True 655 entryFound = True
655 entryInfoList.remove(f) 656 entryInfoList.remove(f)
656 break 657 break
657 if entryFound: 658 if entryFound:
658 continue 659 continue

eric ide

mercurial