Set data of existing item.
This commit is contained in:
parent
97dd86735a
commit
dbd121a079
@ -78,13 +78,13 @@ class UrlCompletionModel(base.BaseCompletionModel):
|
|||||||
if item.url:
|
if item.url:
|
||||||
if self._history.historyContains(item.url):
|
if self._history.historyContains(item.url):
|
||||||
for i in range(self._history_cat.rowCount()):
|
for i in range(self._history_cat.rowCount()):
|
||||||
name = self._history_cat.child(i, 0)
|
name_item = self._history_cat.child(i, 0)
|
||||||
if not name:
|
atime_item = self._history_cat.child(i, 2)
|
||||||
|
if not name_item:
|
||||||
continue
|
continue
|
||||||
if name.text() == item.url:
|
if name_item.text() == item.url:
|
||||||
self._history_cat.setChild(
|
atime_item.setText(self._fmt_atime(item.atime))
|
||||||
i, 2, QStandardItem(self._fmt_atime(item.atime)))
|
name_item.setData(int(item.atime), base.Role.sort)
|
||||||
name.setData(int(item.atime), base.Role.sort)
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.new_item(self._history_cat, item.url, "",
|
self.new_item(self._history_cat, item.url, "",
|
||||||
|
Loading…
Reference in New Issue
Block a user