1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Need std::string to compile on Windows in first place.

This commit is contained in:
Tomasz Zieliński 2022-09-05 09:45:15 +02:00
parent 3430edba22
commit d1471fb3ed
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ QImage BitmapHandler::loadBitmapFromDir(std::string path, std::string fname, boo
}
else
{ //loading via SDL_Image
QImage image(QString::fromStdString(fullpath->native()));
QImage image(QString::fromStdString(fullpath->make_preferred().string()));
if(!image.isNull())
{
if(image.bitPlaneCount() == 1)

View File

@ -186,7 +186,7 @@ void MainWindow::initializeMap(bool isNew)
void MainWindow::on_actionOpen_triggered()
{
auto filenameSelect = QFileDialog::getOpenFileName(this, tr("Open Image"), QString::fromStdString(VCMIDirs::get().userCachePath().native()), tr("Homm3 Files (*.vmap *.h3m)"));
auto filenameSelect = QFileDialog::getOpenFileName(this, tr("Open Image"), QString::fromStdString(VCMIDirs::get().userCachePath().make_preferred().string()), tr("Homm3 Files (*.vmap *.h3m)"));
if(filenameSelect.isNull())
return;