Changeset c4f831a65125…
Parent db7648fa51d4…
by
Changes to 2 files · Browse files at c4f831a65125 Showing diff from parent db7648fa51d4 Diff from another changeset...
@@ -1,5 +1,5 @@ from nose.tools import *
-from PyQt4.QtCore import QModelIndex
+from PyQt4.QtCore import QModelIndex, QString
from tortoisehg.hgqt.manifestmodel import ManifestModel
from tests import get_fixture_repo, with_encoding
@@ -72,6 +72,10 @@ assert_equals(m.index(0, 0), m.indexFromPath('baz'))
assert_equals(m.index(0, 0, m.index(0, 0)), m.indexFromPath('baz/bax'))
+def test_indexfrompath_qstr():
+ m = newmodel()
+ assert_equals(m.index(1, 0), m.indexFromPath(QString('bar')))
+
@with_encoding('euc-jp')
def test_indexfrompath_eucjp():
m = newmodel(name='euc-jp-path')
|
@@ -122,7 +122,7 @@ return QModelIndex()
e = self._rootentry
- paths = path and path.split('/') or []
+ paths = path and unicode(path).split('/') or []
try:
for p in paths:
e = e[p]
|
Loading...