418 |
418 |
419 @param path path of the deleted file or directory |
419 @param path path of the deleted file or directory |
420 @type str |
420 @type str |
421 @param isDir flag indicating a deleted directory (defaults to False) (unused) |
421 @param isDir flag indicating a deleted directory (defaults to False) (unused) |
422 @type bool (optional) |
422 @type bool (optional) |
|
423 @return flag indicating a deletion |
|
424 @rtype bool |
423 """ |
425 """ |
424 parentPath = os.path.dirname(path) |
426 parentPath = os.path.dirname(path) |
425 if parentPath not in self.watchedDirItems: |
427 if parentPath not in self.watchedDirItems: |
426 # just ignore the situation we don't have a reference to the item |
428 # just ignore the situation we don't have a reference to the item |
427 return |
429 return |
432 if child.name() == path: |
434 if child.name() == path: |
433 self._removeWatchedItem(child) |
435 self._removeWatchedItem(child) |
434 self.beginRemoveRows(self.createIndex(itm.row(), 0, itm), row, row) |
436 self.beginRemoveRows(self.createIndex(itm.row(), 0, itm), row, row) |
435 itm.removeChild(child) |
437 itm.removeChild(child) |
436 self.endRemoveRows() |
438 self.endRemoveRows() |
437 break |
439 return True |
|
440 |
|
441 return False |
438 |
442 |
439 def __populateModel(self): |
443 def __populateModel(self): |
440 """ |
444 """ |
441 Private method to populate the browser model. |
445 Private method to populate the browser model. |
442 """ |
446 """ |