Helpviewer/CookieJar/CookiesDialog.py

changeset 37
bfe92e414977
parent 13
1af94a91f439
child 463
8d0309c4b7f6
child 792
a13346916170
equal deleted inserted replaced
36:835407b77a50 37:bfe92e414977
73 header = fm.width(QDateTime.currentDateTime().toString(Qt.LocalDate)) 73 header = fm.width(QDateTime.currentDateTime().toString(Qt.LocalDate))
74 buffer = fm.width("mm") 74 buffer = fm.width("mm")
75 header += buffer 75 header += buffer
76 self.cookiesTable.horizontalHeader().resizeSection(section, header) 76 self.cookiesTable.horizontalHeader().resizeSection(section, header)
77 self.cookiesTable.horizontalHeader().setStretchLastSection(True) 77 self.cookiesTable.horizontalHeader().setStretchLastSection(True)
78 self.cookiesTable.model().sort(
79 self.cookiesTable.horizontalHeader().sortIndicatorSection(),
80 Qt.AscendingOrder)
78 81
79 self.__detailsDialog = None 82 self.__detailsDialog = None
80 83
81 def __showCookieDetails(self, index): 84 def __showCookieDetails(self, index):
82 """ 85 """
97 domain = model.data(model.index(row, 0)) 100 domain = model.data(model.index(row, 0))
98 name = model.data(model.index(row, 1)) 101 name = model.data(model.index(row, 1))
99 path = model.data(model.index(row, 2)) 102 path = model.data(model.index(row, 2))
100 secure = model.data(model.index(row, 3)) 103 secure = model.data(model.index(row, 3))
101 expires = model.data(model.index(row, 4)).toString("yyyy-MM-dd hh:mm") 104 expires = model.data(model.index(row, 4)).toString("yyyy-MM-dd hh:mm")
102 value = str( 105 value = bytes(
103 QByteArray.fromPercentEncoding(model.data(model.index(row, 5)))) 106 QByteArray.fromPercentEncoding(model.data(model.index(row, 5)))).decode()
104 107
105 if self.__detailsDialog is None: 108 if self.__detailsDialog is None:
106 self.__detailsDialog = CookieDetailsDialog(self) 109 self.__detailsDialog = CookieDetailsDialog(self)
107 self.__detailsDialog.setData(domain, name, path, secure, expires, value) 110 self.__detailsDialog.setData(domain, name, path, secure, expires, value)
108 self.__detailsDialog.show() 111 self.__detailsDialog.show()

eric ide

mercurial