def setData(self, index, value, role): row, col = index.row(), index.column() if role == QtCore.Qt.EditRole and idaapi.is_ident(str(value)): self.items[row].name = str(value) self.dataChanged.emit(index, index) return True return False
def setData(self, column, value): if column == 0: if idaapi.is_ident(value) and self.name != value: self.name = value self.modified = True return True return False
def setData(self, column, value): if column == 0: if idaapi.is_ident(value) and self.name != value: self.name = value self.name_modified = True for parent in self.parents: parent.modified = True return True elif column == 1: tinfo = idaapi.tinfo_t() split = value.split('(') if len(split) == 2: value = split[0] + ' ' + self.name + '(' + split[1] + ';' if idaapi.parse_decl(tinfo, idaapi.cvar.idati, value, idaapi.PT_TYP) is not None: if tinfo.is_func(): tinfo.create_ptr(tinfo) if tinfo.dstr() != self.tinfo.dstr(): self.tinfo = tinfo self.tinfo_modified = True for parent in self.parents: parent.modified = True return True return False