avoid implicit casting from char* to QString
fixed compilation with pre C++11 compilers
little improvment in error handling