http://codereview.appspot.com/5503068/diff/1/spyderlib/plugins/history.py File spyderlib/plugins/history.py (right): http://codereview.appspot.com/5503068/diff/1/spyderlib/plugins/history.py#newcode243 spyderlib/plugins/history.py:243: if os.environ.get('QT_API') != 'pyside': This is not a good ...
13 years, 2 months ago
(2012-01-07 14:37:46 UTC)
#1
http://codereview.appspot.com/5503068/diff/1/spyderlib/plugins/history.py
File spyderlib/plugins/history.py (right):
http://codereview.appspot.com/5503068/diff/1/spyderlib/plugins/history.py#new...
spyderlib/plugins/history.py:243: if os.environ.get('QT_API') != 'pyside':
This is not a good idea: this won't work with PyQt API #2 for which filename
won't be a QString.
The simplest way for dealing with this would be:
(this is doing exactly the same thing as your original code but will work with
PyQt API#1/2 and PySide)
if not isinstance(filename, basestring): # filename is a QString
filename = unicode(filename.toUtf8(), 'utf-8')
command = unicode(command)
Issue 5503068: Series of commits directed to solve once and for all this issue
Created 13 years, 3 months ago by Carlos Córdoba
Modified 13 years, 2 months ago
Reviewers: pierre.raybaut, techtonik, Carlos Córdoba
Base URL:
Comments: 1