mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix PyQt 5 no longer tolerating passing QDateTime to setDate()
This commit is contained in:
parent
202bcb2e3b
commit
2bd59cb636
@ -138,6 +138,8 @@ class PubDateDelegate(QStyledItemDelegate): # {{{
|
||||
val = index.data(Qt.EditRole)
|
||||
if is_date_undefined(val):
|
||||
val = QDate(2000, 1, 1)
|
||||
if isinstance(val, QDateTime):
|
||||
val = val.date()
|
||||
editor.setDate(val)
|
||||
|
||||
# }}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user