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;