Fix building

Forgot to commit updated file generated by flex.
Qt5 testing: do not require QtGui

Do not require a running X server while running the tests. This
solution works only on Qt5 right now.