src: Move string conversion from lib_gui to lib and use boost instead of Qt
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
#include "utility/utilityQString.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
std::wstring utility::decodeFromUtf8(std::string s)
|
||||
{
|
||||
QString qs = QString::fromUtf8(s.c_str());
|
||||
return qs.toStdWString();
|
||||
}
|
||||
|
||||
std::string utility::encodeToUtf8(std::wstring s)
|
||||
{
|
||||
QString qs = QString::fromStdWString(s);
|
||||
return qs.toUtf8().toStdString();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef UTILITY_Q_STRING_H
|
||||
#define UTILITY_Q_STRING_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace utility
|
||||
{
|
||||
std::wstring decodeFromUtf8(std::string s);
|
||||
std::string encodeToUtf8(std::wstring s);
|
||||
}
|
||||
|
||||
#endif // UTILITY_Q_STRING_H
|
||||
|
||||
Reference in New Issue
Block a user