From 7aaeea2bd2b045f90465f7a64e48b3c5540e6478 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 24 Jun 2026 00:36:42 -0300 Subject: [PATCH] fix: wide string literals for url_prefix concatenation on Windows The Windows path builds url_prefix as a wide string. MSVC accepts concatenating the narrow literals here, but clang-cl rejects the mixed narrow/wide expression. Use wide literals so the concatenation type matches. --- src/slic3r/GUI/GUI_App.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index b46273d64a..d3aa486d09 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -9224,7 +9224,7 @@ bool GUI_App::check_url_association(std::wstring url_prefix, std::wstring& reg_b { reg_bin = L""; #ifdef WIN32 - wxRegKey key_full(wxRegKey::HKCU, "Software\\Classes\\" + url_prefix + "\\shell\\open\\command"); + wxRegKey key_full(wxRegKey::HKCU, L"Software\\Classes\\" + url_prefix + L"\\shell\\open\\command"); if (!key_full.Exists()) { return false; } @@ -9250,8 +9250,8 @@ void GUI_App::associate_url(std::wstring url_prefix) wxString key_string = "\"" + wbinary + "\" \"%1\""; - wxRegKey key_first(wxRegKey::HKCU, "Software\\Classes\\" + url_prefix); - wxRegKey key_full(wxRegKey::HKCU, "Software\\Classes\\" + url_prefix + "\\shell\\open\\command"); + wxRegKey key_first(wxRegKey::HKCU, L"Software\\Classes\\" + url_prefix); + wxRegKey key_full(wxRegKey::HKCU, L"Software\\Classes\\" + url_prefix + L"\\shell\\open\\command"); if (!key_first.Exists()) { key_first.Create(false); } @@ -9271,7 +9271,7 @@ void GUI_App::disassociate_url(std::wstring url_prefix) #ifdef WIN32 if (is_running_in_msix()) return; - wxRegKey key_full(wxRegKey::HKCU, "Software\\Classes\\" + url_prefix + "\\shell\\open\\command"); + wxRegKey key_full(wxRegKey::HKCU, L"Software\\Classes\\" + url_prefix + L"\\shell\\open\\command"); if (!key_full.Exists()) { return; }