2013-08-22 17:22:49 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../Global.h"
|
|
|
|
|
|
|
|
#include <QtWidgets>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QSet>
|
|
|
|
#include <QVector>
|
|
|
|
#include <QList>
|
|
|
|
#include <QString>
|
2014-08-21 23:26:28 +03:00
|
|
|
#include <QFile>
|
|
|
|
|
2022-07-29 08:52:39 +02:00
|
|
|
VCMI_LIB_USING_NAMESPACE
|
|
|
|
|
2014-08-21 23:26:28 +03:00
|
|
|
inline QString pathToQString(const boost::filesystem::path & path)
|
|
|
|
{
|
|
|
|
#ifdef VCMI_WINDOWS
|
|
|
|
return QString::fromStdWString(path.wstring());
|
|
|
|
#else
|
|
|
|
return QString::fromStdString(path.string());
|
|
|
|
#endif
|
2016-01-09 22:23:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
inline boost::filesystem::path qstringToPath(const QString & path)
|
|
|
|
{
|
|
|
|
#ifdef VCMI_WINDOWS
|
|
|
|
return boost::filesystem::path(path.toStdWString());
|
|
|
|
#else
|
2016-01-16 17:36:16 +02:00
|
|
|
return boost::filesystem::path(path.toUtf8().data());
|
2016-01-09 22:23:55 +02:00
|
|
|
#endif
|
|
|
|
}
|