Trying to fix avatar file name charset issue #44

This commit is contained in:
lotodore
2011-02-04 21:14:49 +00:00
parent ca25c35b94
commit 8c9a17f7db
4 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ QtHelper::~QtHelper()
std::string QtHelper::stringToUtf8(const std::string &myString) {
QString tmpString = QString::fromStdString(myString);
QString tmpString = QString::fromLocal8Bit(myString.c_str());
std::string myUtf8String = tmpString.toUtf8().constData();
return myUtf8String;
@@ -34,7 +34,7 @@ std::string QtHelper::stringToUtf8(const std::string &myString) {
std::string QtHelper::stringFromUtf8(const std::string &myString) {
QString tmpString = QString::fromUtf8(myString.c_str());
return tmpString.toStdString();
return tmpString.toLocal8Bit().constData();
}
std::string QtHelper::getDefaultLanguage() { return QLocale::system().name().toStdString(); }