mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
a1a5bc28c2
Mixed line endings cause problems when exporting patches with git-format-patch and then trying to "git am" a patch with mixed and non-matching line endings. In such a situation git will fail to apply the patch. This commit runs the dos2unix tools on the remaining files with CRLF (\r\n) line endings to convert them to line-feeds (\n) only. Files that are Windows specific like *.vcxproj and *.props files were not converted. Closes: #3073
32 lines
611 B
C++
32 lines
611 B
C++
#pragma once
|
|
|
|
#include "../Global.h"
|
|
|
|
#include <QtWidgets>
|
|
#include <QStringList>
|
|
#include <QSet>
|
|
#include <QVector>
|
|
#include <QList>
|
|
#include <QString>
|
|
#include <QFile>
|
|
|
|
VCMI_LIB_USING_NAMESPACE
|
|
|
|
inline QString pathToQString(const boost::filesystem::path & path)
|
|
{
|
|
#ifdef VCMI_WINDOWS
|
|
return QString::fromStdWString(path.wstring());
|
|
#else
|
|
return QString::fromStdString(path.string());
|
|
#endif
|
|
}
|
|
|
|
inline boost::filesystem::path qstringToPath(const QString & path)
|
|
{
|
|
#ifdef VCMI_WINDOWS
|
|
return boost::filesystem::path(path.toStdWString());
|
|
#else
|
|
return boost::filesystem::path(path.toUtf8().data());
|
|
#endif
|
|
}
|