gfilemonitor: Emit GObject::notify by pspec rather than property name

This is equivalent, but slightly faster, as it avoids a pspec lookup.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2025-02-13 18:57:58 +00:00
parent 8ffdbb55d9
commit 06077435c9
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA

View File

@ -254,7 +254,7 @@ g_file_monitor_cancel (GFileMonitor *monitor)
G_FILE_MONITOR_GET_CLASS (monitor)->cancel (monitor);
g_atomic_int_set (&monitor->priv->cancelled, CANCEL_STATE_CANCELLED);
g_object_notify (G_OBJECT (monitor), "cancelled");
g_object_notify_by_pspec (G_OBJECT (monitor), props[PROP_CANCELLED]);
}
return TRUE;