QString instead of std::string. added socket error handle, still not completed the handling