From d1471fb3ed39edb194c6d82ac228ff108625ba13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Mon, 5 Sep 2022 09:45:15 +0200 Subject: [PATCH] Need std::string to compile on Windows in first place. --- mapeditor/BitmapHandler.cpp | 2 +- mapeditor/mainwindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mapeditor/BitmapHandler.cpp b/mapeditor/BitmapHandler.cpp index 77d7c58e5..bbd0fa177 100644 --- a/mapeditor/BitmapHandler.cpp +++ b/mapeditor/BitmapHandler.cpp @@ -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) diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index 25250c188..9079c6b81 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -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;