modified to be compiled by QtCreator with either clang 3.2 or gcc 4.8