Stop testing for QString, fixes AttributeError in PySide
Merge pull request #2328 from mspacek/qtapi

Fix PySide compatibility
Fix wrong syntax for assert

The assert statement doesn't take parentheses, see
http://docs.python.org/3.2/reference/simple_stmts.html#assert
http://docs.python.org/2/reference/simple_stmts.html#grammar-token-assert_stmt

I found this because python gave me the following
```SyntaxWarning: assertion is always true, perhaps remove parentheses?```
Merge pull request #2333 from andreabedini/patch-3

Fix wrong syntax for assert