550 |
550 |
551 @param name name of the item (string) |
551 @param name name of the item (string) |
552 @return reference to the item found |
552 @return reference to the item found |
553 """ |
553 """ |
554 if QDir.isAbsolutePath(name): |
554 if QDir.isAbsolutePath(name): |
555 name = name.replace(self.project.ppath + os.sep, "") |
555 name = self.project.getRelativePath(name) |
556 pathlist = re.split(r'/|\\', name) |
556 pathlist = re.split(r'/|\\', name) |
557 if len(pathlist) > 0: |
557 if len(pathlist) > 0: |
558 olditem = self.rootItem |
558 olditem = self.rootItem |
559 for p in pathlist: |
559 for p in pathlist: |
560 itm = self.findChildItem(p, 0, olditem) |
560 itm = self.findChildItem(p, 0, olditem) |