Return None for .name of enum if no name for value.

This fixes segfaults when trying to get the name of a dead key
from a qt key event.

Change-Id: Ie631e2245bca0a3fee8616854f6479d3dec0c2bb
Reviewed-by: Roman Lacko <backup.rlacko@gmail.com>
Reviewed-by: John Cummings <jcummings2@users.sf.net>
Bump version number to 1.2.1

Change-Id: I96686740c2572818fce36de23cf2c16f127fdda9
Reviewed-by: Roman Lacko <backup.rlacko@gmail.com>
Reviewed-by: John Cumming <john@jsolutions.co.uk>
Reviewed-by: John Cummings <jcummings2@users.sf.net>
Improve dependencies for tests

Add the global header and typesystem XML, and shiboken itself, as
dependencies to running Shiboken for generating the wrapped code used in
the unit tests. This gives a better example in case of users looking at
this code for how to do things in their own projects, and also makes
test writing easier by removing the need to do a clean build or touch
files to force the wrapping code to be recreated when modifying the test
code or the generator. Change command invocation to use shiboken as a
target name (CMake will recognize it as a target and use the correct
path automatically), and remove the now redundant dependency of the
wrapping libraries on the same. (This is superfluous both because using
shiboken as a target will cause CMake to add an implicit dependency on
it for users of the generated files, but also because it isn't really
needed; the generate command having it as a dependency covers needing it
built first, and is what we really care about as far as rebuilding
anything if it changes.)

Change-Id: If5cdf2e98602e500b49ba7b000e4e30e77e1a136
Reviewed-by: John Ehresman <jpe@wingware.com>
Fix '%#' substitution for # > 9

Change '%#' substitution to use a regular expression for the 'old' text
to enforce a word boundary after '#', such that we don't perform e.g.
'%1' replacement on inputs like '%10'. This fixes problems trying to
modify functions with more than nine arguments, such as the example from
the previous commit (which now compiles and passes). Also add a test
case for this.

Change-Id: I9956804b3c65bddf7e36838866641b24ceb87c57
Reviewed-by: John Ehresman <jpe@wingware.com>
Updated authors file

Change-Id: I43bc9ad2b32fc24bdbbc38728ae34e60ea843103
Reviewed-by: Roman Lacko <backup.rlacko@gmail.com>
Reviewed-by: John Cummings <jcummings2@users.sf.net>
Clean up style

Change wrapping and indent of some code in Handler::startElement to
improve consistency.

Change-Id: I13bae6bbb732e3c5791cf0079154feed8d8dcbd1
Reviewed-by: John Cummings <jcummings2@users.sf.net>
Fix description of sample/transform unit test

Change-Id: I942d2f450c8c57bed779925636a9abae572da98c
Reviewed-by: John Cummings <jcummings2@users.sf.net>
Remove unnecessary line feed

Remove explicit '\n' from echo command in 'dist' target. This isn't
needed (echo should output one regardless, so it only creates an
additional empty line), and it is being parsed by CMake, which results
in generating a build.ninja on at least Windows that cannot be parsed
due to an unterminated string.

Change-Id: I5d8aba12c71f5a9c29a07108c50499081ba7203a
Reviewed-by: John Ehresman <jpe@wingware.com>
Work around MSVC's deficient <cmath>

Change libsample/transform.cpp to use the MSVC-specific _finite on
Windows, rather than std::isfinite, which MSVC does not implement.

Change-Id: If7b33e17bcb7c2e4432d670d44b559205f88796d
Reviewed-by: John Ehresman <jpe@wingware.com>