Helpviewer/CookieJar/CookiesDialog.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 12
1d8dd9706f46
equal deleted inserted replaced
6:52e8c820d0dd 7:c679fb30c8f3
92 return 92 return
93 93
94 model = cookiesTable.model() 94 model = cookiesTable.model()
95 row = index.row() 95 row = index.row()
96 96
97 domain = model.data(model.index(row, 0)).toString() 97 domain = model.data(model.index(row, 0))
98 name = model.data(model.index(row, 1)).toString() 98 name = model.data(model.index(row, 1))
99 path = model.data(model.index(row, 2)).toString() 99 path = model.data(model.index(row, 2))
100 secure = model.data(model.index(row, 3)).toBool() 100 secure = model.data(model.index(row, 3))
101 expires = model.data(model.index(row, 4)).toDateTime()\ 101 expires = model.data(model.index(row, 4)).toString("yyyy-MM-dd hh:mm")
102 .toString("yyyy-MM-dd hh:mm")
103 value = unicode( 102 value = unicode(
104 QByteArray.fromPercentEncoding(model.data(model.index(row, 5)).toByteArray())) 103 QByteArray.fromPercentEncoding(model.data(model.index(row, 5))))
105 104
106 if self.__detailsDialog is None: 105 if self.__detailsDialog is None:
107 self.__detailsDialog = CookieDetailsDialog(self) 106 self.__detailsDialog = CookieDetailsDialog(self)
108 self.__detailsDialog.setData(domain, name, path, secure, expires, value) 107 self.__detailsDialog.setData(domain, name, path, secure, expires, value)
109 self.__detailsDialog.show() 108 self.__detailsDialog.show()
117 if len(selection) == 0: 116 if len(selection) == 0:
118 return 117 return
119 118
120 firstSelected = selection[0] 119 firstSelected = selection[0]
121 domainSelection = firstSelected.sibling(firstSelected.row(), 0) 120 domainSelection = firstSelected.sibling(firstSelected.row(), 0)
122 domain = self.__proxyModel.data(domainSelection, Qt.DisplayRole).toString() 121 domain = self.__proxyModel.data(domainSelection, Qt.DisplayRole)
123 dlg = CookiesExceptionsDialog(self.__cookieJar, self) 122 dlg = CookiesExceptionsDialog(self.__cookieJar, self)
124 dlg.setDomainName(domain) 123 dlg.setDomainName(domain)
125 dlg.exec_() 124 dlg.exec_()
126 125
127 def __tableSelectionChanged(self, selected, deselected): 126 def __tableSelectionChanged(self, selected, deselected):

eric ide

mercurial