StdInc.h 611 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "../Global.h"
  3. #include <QtWidgets>
  4. #include <QStringList>
  5. #include <QSet>
  6. #include <QVector>
  7. #include <QList>
  8. #include <QString>
  9. #include <QFile>
  10. VCMI_LIB_USING_NAMESPACE
  11. inline QString pathToQString(const boost::filesystem::path & path)
  12. {
  13. #ifdef VCMI_WINDOWS
  14. return QString::fromStdWString(path.wstring());
  15. #else
  16. return QString::fromStdString(path.string());
  17. #endif
  18. }
  19. inline boost::filesystem::path qstringToPath(const QString & path)
  20. {
  21. #ifdef VCMI_WINDOWS
  22. return boost::filesystem::path(path.toStdWString());
  23. #else
  24. return boost::filesystem::path(path.toUtf8().data());
  25. #endif
  26. }