fix: adjust Glib::ustring creation in a few places (#4859)

From what I observed, ctor accepting `(begin, end)` is getting called
instead of one accepting `(data, size)` for no apparent reason in some
cases. Switch to a ctor accepting a `std::string` in those problematic
places.
This commit is contained in:
Mike Gelfand
2023-02-13 20:16:15 +03:00
committed by GitHub
parent 05dded12a0
commit 25b50a7dff
2 changed files with 3 additions and 5 deletions

View File

@@ -1296,9 +1296,7 @@ void Application::Impl::on_prefs_changed(tr_quark const key)
{
bool const b = gtr_pref_flag_get(key);
tr_sessionUseAltSpeed(tr, b);
auto const key_sv = tr_quark_get_string_view(key);
auto const key_ustr = Glib::ustring{ std::data(key_sv), std::size(key_sv) };
gtr_action_set_toggled(key_ustr, b);
gtr_action_set_toggled(std::string(tr_quark_get_string_view(key)), b);
break;
}