qtutils: remove unused selected_treeitem() function

Signed-off-by: Daniel Harding <dharding@living180.net>
qtutils: remove selection_list() function

It performed the same function as the selected_items() function, so
change the one caller to use selected_items(), and remove the now-unused
selection_list() function.

Signed-off-by: Daniel Harding <dharding@living180.net>
qtutils: refactor selection utility functions

Update to avoid generating intermediate lists when direct iteration can
be used.

Signed-off-by: Daniel Harding <dharding@living180.net>
qtutils: replace selected_row() function

All uses of qtutils.selected_row() could be more cleanly written by
using qtutils.selected_item() instead, so make those changes and remove
the selected_row() function.

Signed-off-by: Daniel Harding <dharding@living180.net>
widgets/search: fix for Python 3

The Search dialog did not work under Python 3.  This is due to the fact
that the result of calling the builtin function map() was being passed
to the QListWidget.addItems() method in the Search.set_commit_list()
method.  This worked fine under Python 2 because map() returns a list.
Under Python 3 however it returns an iterator, which causes PyQt to
raise an exception.  Fix by replacing the call to map() in the
Search.display_results() method with a list comprehension.

Signed-off-by: Daniel Harding <dharding@living180.net>
Merge pull request #380 from living180/refactor_selection_utils

Refactor selection functions in qtutils

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge pull request #381 from living180/python3_search

Fix search on Python 3

Signed-off-by: David Aguilar <davvid@gmail.com>