mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 21:29:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user