mirror of
https://github.com/SELinuxProject/setools
synced 2025-04-24 12:24:27 +00:00
TERuleListModel: Add conditional block column.
This commit is contained in:
parent
fcfba569cc
commit
00807f846d
@ -159,11 +159,13 @@ class TERuleListModel(RuleListModel):
|
|||||||
return "Permissons/Default Type"
|
return "Permissons/Default Type"
|
||||||
elif section == 5:
|
elif section == 5:
|
||||||
return "Conditional Expression"
|
return "Conditional Expression"
|
||||||
|
elif section == 6:
|
||||||
|
return "Conditional Block"
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid column number: {0}".format(section))
|
raise ValueError("Invalid column number: {0}".format(section))
|
||||||
|
|
||||||
def columnCount(self, parent=QModelIndex()):
|
def columnCount(self, parent=QModelIndex()):
|
||||||
return 6
|
return 7
|
||||||
|
|
||||||
def data(self, index, role):
|
def data(self, index, role):
|
||||||
if role == Qt.DisplayRole:
|
if role == Qt.DisplayRole:
|
||||||
@ -191,6 +193,11 @@ class TERuleListModel(RuleListModel):
|
|||||||
return str(self.resultlist[row].conditional)
|
return str(self.resultlist[row].conditional)
|
||||||
except RuleNotConditional:
|
except RuleNotConditional:
|
||||||
return None
|
return None
|
||||||
|
elif col == 6:
|
||||||
|
try:
|
||||||
|
return str(self.resultlist[row].conditional_block)
|
||||||
|
except RuleNotConditional:
|
||||||
|
return None
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid column number: {0}".format(col))
|
raise ValueError("Invalid column number: {0}".format(col))
|
||||||
elif role == Qt.UserRole:
|
elif role == Qt.UserRole:
|
||||||
|
Loading…
Reference in New Issue
Block a user