eric6/WebBrowser/CookieJar/CookieExceptionsModel.py

changeset 7268
a28338eaf694
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7267:aedc309827c7 7268:a28338eaf694
45 @return requested data 45 @return requested data
46 """ 46 """
47 if role == Qt.SizeHintRole: 47 if role == Qt.SizeHintRole:
48 fm = QFontMetrics(QFont()) 48 fm = QFontMetrics(QFont())
49 height = fm.height() + fm.height() // 3 49 height = fm.height() + fm.height() // 3
50 width = \ 50 width = fm.width(
51 fm.width(self.headerData(section, orientation, Qt.DisplayRole)) 51 self.headerData(section, orientation, Qt.DisplayRole))
52 return QSize(width, height) 52 return QSize(width, height)
53 53
54 if orientation == Qt.Horizontal and role == Qt.DisplayRole: 54 if orientation == Qt.Horizontal and role == Qt.DisplayRole:
55 try: 55 try:
56 return self.__headers[section] 56 return self.__headers[section]
128 parent = QModelIndex() 128 parent = QModelIndex()
129 129
130 if parent.isValid() or self.__cookieJar is None: 130 if parent.isValid() or self.__cookieJar is None:
131 return 0 131 return 0
132 else: 132 else:
133 return len(self.__allowedCookies) + \ 133 return (
134 len(self.__blockedCookies) + \ 134 len(self.__allowedCookies) +
135 len(self.__blockedCookies) +
135 len(self.__sessionCookies) 136 len(self.__sessionCookies)
137 )
136 138
137 def removeRows(self, row, count, parent=None): 139 def removeRows(self, row, count, parent=None):
138 """ 140 """
139 Public method to remove entries from the model. 141 Public method to remove entries from the model.
140 142

eric ide

mercurial