A language detector in C++/Qt