StdInc.h 614 B

1234567891011121314151617181920212223242526272829
  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. inline QString pathToQString(const boost::filesystem::path & path)
  11. {
  12. #ifdef VCMI_WINDOWS
  13. return QString::fromStdWString(path.wstring());
  14. #else
  15. return QString::fromStdString(path.string());
  16. #endif
  17. }
  18. inline boost::filesystem::path qstringToPath(const QString & path)
  19. {
  20. #ifdef VCMI_WINDOWS
  21. return boost::filesystem::path(path.toStdWString());
  22. #else
  23. return boost::filesystem::path(path.toUtf8().data());
  24. #endif
  25. }