mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-23 01:49:17 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user