qtpy: make git-cola pyside-compatible
commit0eb9e65a73ab36eede77163db4640d04dd420766
authorDavid Aguilar <davvid@gmail.com>
Mon, 11 Jul 2016 01:56:23 +0000 (10 18:56 -0700)
committerDavid Aguilar <davvid@gmail.com>
Mon, 11 Jul 2016 01:56:29 +0000 (10 18:56 -0700)
treed59662d399775fba5297f67b791911b024ceb156
parentef4c554d42ba24efc4d9e1cd1b305338e5fe0365
qtpy: make git-cola pyside-compatible

Pyside segfaults if the argv passed to it contains unicode, so
avoid the core.abspath() wrapper when starting the application.

Pyside's hotkey wrappers are less featureful and do not support
binding hotkeys with ints or Qt.Key_XXX | Qt.XXX_Modifier.
Use QKeySequence for all hotkeys to make them compatible across
all Qt binding libraries.

Pyside requires that QTreeWidgetItem subclasses implement __eq__
in order to use `item in list` expressions, so we provide a
minimal implementation that checks for item identity.
Checking the sha1s would makes it less robust, e.g. it would
fail if given a specially crafted file todo with duplicate
sha1s, so object identity is used for both robustness and speed.

Signed-off-by: David Aguilar <davvid@gmail.com>
cola/app.py
cola/hotkeys.py
cola/models/browse.py
cola/widgets/diff.py
cola/widgets/text.py
share/git-cola/bin/git-xbase