mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
pass unicode name to qt
This commit is contained in:
parent
4ef36ced69
commit
ed1758bb30
1 changed files with 2 additions and 1 deletions
|
@ -578,7 +578,8 @@ class FactEdit(QTextEdit):
|
||||||
if source.hasImage():
|
if source.hasImage():
|
||||||
im = QImage(source.imageData())
|
im = QImage(source.imageData())
|
||||||
(fd, name) = tempfile.mkstemp(suffix=".jpg")
|
(fd, name) = tempfile.mkstemp(suffix=".jpg")
|
||||||
im.save(name, None, 95)
|
uname = unicode(name, sys.getfilesystemencoding())
|
||||||
|
im.save(uname, None, 95)
|
||||||
self.parent._addPicture(name, widget=self)
|
self.parent._addPicture(name, widget=self)
|
||||||
return
|
return
|
||||||
if source.hasHtml():
|
if source.hasHtml():
|
||||||
|
|
Loading…
Reference in a new issue