mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-26 19:39:14 +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"";
|
reg_bin = L"";
|
||||||
#ifdef WIN32
|
#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()) {
|
if (!key_full.Exists()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -9250,8 +9250,8 @@ void GUI_App::associate_url(std::wstring url_prefix)
|
|||||||
|
|
||||||
wxString key_string = "\"" + wbinary + "\" \"%1\"";
|
wxString key_string = "\"" + wbinary + "\" \"%1\"";
|
||||||
|
|
||||||
wxRegKey key_first(wxRegKey::HKCU, "Software\\Classes\\" + url_prefix);
|
wxRegKey key_first(wxRegKey::HKCU, L"Software\\Classes\\" + url_prefix);
|
||||||
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_first.Exists()) {
|
if (!key_first.Exists()) {
|
||||||
key_first.Create(false);
|
key_first.Create(false);
|
||||||
}
|
}
|
||||||
@@ -9271,7 +9271,7 @@ void GUI_App::disassociate_url(std::wstring url_prefix)
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if (is_running_in_msix())
|
if (is_running_in_msix())
|
||||||
return;
|
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()) {
|
if (!key_full.Exists()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user