eric6/WebBrowser/History/HistoryManager.py

changeset 8260
2161475d9639
parent 8218
7c09585bd960
equal deleted inserted replaced
8259:2bbec88047dd 8260:2161475d9639
358 358
359 while self.__history: 359 while self.__history:
360 checkForExpired = QDateTime(self.__history[-1].dateTime) 360 checkForExpired = QDateTime(self.__history[-1].dateTime)
361 checkForExpired.setDate( 361 checkForExpired.setDate(
362 checkForExpired.date().addDays(self.__daysToExpire)) 362 checkForExpired.date().addDays(self.__daysToExpire))
363 if now.daysTo(checkForExpired) > 7: 363 nextTimeout = (
364 nextTimeout = 7 * 86400 364 7 * 86400
365 else: 365 if now.daysTo(checkForExpired) > 7 else
366 nextTimeout = now.secsTo(checkForExpired) 366 now.secsTo(checkForExpired)
367 )
367 if nextTimeout > 0: 368 if nextTimeout > 0:
368 break 369 break
369 370
370 itm = self.__history.pop(-1) 371 itm = self.__history.pop(-1)
371 self.__lastSavedUrl = "" 372 self.__lastSavedUrl = ""

eric ide

mercurial