1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix: Avoid ambiguous overload when calling Gdk::Cursor::create (#7070)

Since gtkmm 4.15.0 a new overload for Gdk::Cursor::create exists
which creates an ambiguity when passing a string literal.

We can avoid the ambiguity by explicitly constructing a Glib::ustring
from the string literal before calling the method.

https://gitlab.gnome.org/GNOME/gtkmm/-/issues/159
This commit is contained in:
Alessandro Astone 2024-08-21 12:33:36 +02:00 committed by GitHub
parent 1e16912ae4
commit 173c19eb5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -887,7 +887,7 @@ void MainWindow::set_busy(bool isBusy)
if (get_realized())
{
#if GTKMM_CHECK_VERSION(4, 0, 0)
auto const cursor = isBusy ? Gdk::Cursor::create("wait") : Glib::RefPtr<Gdk::Cursor>();
auto const cursor = isBusy ? Gdk::Cursor::create(Glib::ustring("wait")) : Glib::RefPtr<Gdk::Cursor>();
set_cursor(cursor);
#else
auto const display = get_display();