diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp index 84ffb4b2..36c792db 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp @@ -6,6 +6,7 @@ #include +#include #include #include @@ -44,7 +45,8 @@ struct PlacefileIconInfo { // Resolve using base URL auto baseUrl = QUrl::fromUserInput(QString::fromStdString(baseUrlString)); - auto relativeUrl = QUrl(QString::fromStdString(iconFile->filename_)); + auto relativeUrl = QUrl(QDir::fromNativeSeparators( + QString::fromStdString(iconFile->filename_))); resolvedUrl_ = baseUrl.resolved(relativeUrl).toString().toStdString(); } diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_images.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_images.cpp index 3a5809c9..1b46bd99 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_images.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_images.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -39,8 +40,9 @@ struct PlacefileImageInfo { // Resolve using base URL auto baseUrl = QUrl::fromUserInput(QString::fromStdString(baseUrlString)); - auto relativeUrl = QUrl(QString::fromStdString(imageFile)); - resolvedUrl_ = baseUrl.resolved(relativeUrl).toString().toStdString(); + auto relativeUrl = + QUrl(QDir::fromNativeSeparators(QString::fromStdString(imageFile))); + resolvedUrl_ = baseUrl.resolved(relativeUrl).toString().toStdString(); } void UpdateTextureInfo(); diff --git a/scwx-qt/source/scwx/qt/manager/placefile_manager.cpp b/scwx-qt/source/scwx/qt/manager/placefile_manager.cpp index 67bc3f1c..a4ebd0fa 100644 --- a/scwx-qt/source/scwx/qt/manager/placefile_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/placefile_manager.cpp @@ -765,8 +765,9 @@ PlacefileManager::Impl::LoadImageResources( [&baseUrl](auto& iconFile) { // Resolve target URL relative to base URL - QUrl fileUrl = - QUrl(QString::fromStdString(iconFile->filename_)); + QString filePath = + QString::fromStdString(iconFile->filename_); + QUrl fileUrl = QUrl(QDir::fromNativeSeparators(filePath)); QUrl resolvedUrl = baseUrl.resolved(fileUrl); return resolvedUrl.toString().toStdString(); @@ -783,7 +784,8 @@ PlacefileManager::Impl::LoadImageResources( std::static_pointer_cast(di) ->imageFile_; - QUrl fileUrl = QUrl(QString::fromStdString(imageFile)); + QString filePath = QString::fromStdString(imageFile); + QUrl fileUrl = QUrl(QDir::fromNativeSeparators(filePath)); QUrl resolvedUrl = baseUrl.resolved(fileUrl); std::string urlString = resolvedUrl.toString().toStdString();