422 self.project.getProjectLanguage() if fileCategory == "SOURCES" else "" |
422 self.project.getProjectLanguage() if fileCategory == "SOURCES" else "" |
423 ) |
423 ) |
424 |
424 |
425 for fn in self.project.getProjectData(dataKey=fileCategory): |
425 for fn in self.project.getProjectData(dataKey=fileCategory): |
426 fname = os.path.join(self.project.ppath, fn) |
426 fname = os.path.join(self.project.ppath, fn) |
427 parentItem, dt = self.findParentItemByName( |
427 parentItem, _dt = self.findParentItemByName( |
428 self.__projectBrowser.getProjectBrowserFilter(fileCategory), fn |
428 self.__projectBrowser.getProjectBrowserFilter(fileCategory), fn |
429 ) |
429 ) |
430 itm = ( |
430 itm = ( |
431 ProjectBrowserDirectoryItem( |
431 ProjectBrowserDirectoryItem( |
432 parentItem, |
432 parentItem, |
544 # Show the entry in bold in the others browser to make it more |
544 # Show the entry in bold in the others browser to make it more |
545 # distinguishable |
545 # distinguishable |
546 bold = typeString == "OTHERS" |
546 bold = typeString == "OTHERS" |
547 |
547 |
548 fname = os.path.join(self.project.ppath, name) |
548 fname = os.path.join(self.project.ppath, name) |
549 parentItem, dt = self.findParentItemByName( |
549 parentItem, _dt = self.findParentItemByName( |
550 self.__projectBrowser.getProjectBrowserFilter(typeString), name |
550 self.__projectBrowser.getProjectBrowserFilter(typeString), name |
551 ) |
551 ) |
552 parentIndex = ( |
552 parentIndex = ( |
553 QModelIndex() |
553 QModelIndex() |
554 if parentItem == self.rootItem |
554 if parentItem == self.rootItem |
909 index2 = self.createIndex( |
909 index2 = self.createIndex( |
910 itm.row(), self.rootItem.columnCount() - 1, itm |
910 itm.row(), self.rootItem.columnCount() - 1, itm |
911 ) |
911 ) |
912 self.dataChanged.emit(index1, index2) |
912 self.dataChanged.emit(index1, index2) |
913 |
913 |
914 head, tail = os.path.split(name) |
914 head, _tail = os.path.split(name) |
915 if head != lastHead: |
915 if head != lastHead: |
916 if lastHead: |
916 if lastHead: |
917 self.__changeParentsVCSState(lastHead, itemCache) |
917 self.__changeParentsVCSState(lastHead, itemCache) |
918 lastHead = head |
918 lastHead = head |
919 if lastHead: |
919 if lastHead: |
951 index1 = self.createIndex(itm.row(), 0, itm) |
951 index1 = self.createIndex(itm.row(), 0, itm) |
952 index2 = self.createIndex( |
952 index2 = self.createIndex( |
953 itm.row(), self.rootItem.columnCount() - 1, itm |
953 itm.row(), self.rootItem.columnCount() - 1, itm |
954 ) |
954 ) |
955 self.dataChanged.emit(index1, index2) |
955 self.dataChanged.emit(index1, index2) |
956 path, tail = os.path.split(path) |
956 path, _tail = os.path.split(path) |
957 |
957 |
958 def preferencesChanged(self): |
958 def preferencesChanged(self): |
959 """ |
959 """ |
960 Public method used to handle a change in preferences. |
960 Public method used to handle a change in preferences. |
961 """ |
961 """ |