Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>

#ifdef WIN32
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#endif

/** Filesystem operations and types */
namespace fs = boost::filesystem;
Expand Down
10 changes: 10 additions & 0 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
#include <QFontDatabase>
#endif

#ifdef WIN32
static fs::detail::utf8_codecvt_facet utf8;
#endif

#if defined(Q_OS_MAC)
extern double NSAppKitVersionNumber;
Expand Down Expand Up @@ -874,12 +876,20 @@ void setClipboard(const QString& str)

fs::path qstringToBoostPath(const QString &path)
{
#ifdef WIN32
return fs::path(path.toStdString(), utf8);
#else
return fs::path(path.toStdString());
#endif
}

QString boostPathToQString(const fs::path &path)
{
#ifdef WIN32
return QString::fromStdString(path.string(utf8));
#else
return QString::fromStdString(path.string());
#endif
}

QString formatDurationStr(int secs)
Expand Down