Make fs::path::string() always return utf-8 string

This commit is contained in:
Chun Kuan Lee
2018-08-04 16:39:14 +00:00
parent 920c090f63
commit 2c3eade704
4 changed files with 6 additions and 6 deletions

View File

@@ -60,8 +60,6 @@
#include <QFontDatabase>
#endif
static fs::detail::utf8_codecvt_facet utf8;
namespace GUIUtil {
QString dateTimeStr(const QDateTime &date)
@@ -764,12 +762,12 @@ void setClipboard(const QString& str)
fs::path qstringToBoostPath(const QString &path)
{
return fs::path(path.toStdString(), utf8);
return fs::path(path.toStdString());
}
QString boostPathToQString(const fs::path &path)
{
return QString::fromStdString(path.string(utf8));
return QString::fromStdString(path.string());
}
QString formatDurationStr(int secs)