[Webkit-unassigned] [Bug 248727] gdesktopappinfo.h not excluded on macOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 5 11:08:57 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=248727

--- Comment #4 from Michael Catanzaro <mcatanzaro at gnome.org> ---
So here's a second attempt. Try this. If it works, I'll create a pull request.

diff --git a/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp b/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp
index 61e4c5e50cb8..820c02e9afeb 100644
--- a/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp
+++ b/Source/WebKit/UIProcess/Notifications/glib/NotificationService.cpp
@@ -31,7 +31,6 @@
 #include <WebCore/NotificationResources.h>
 #include <WebCore/RefPtrCairo.h>
 #include <cairo.h>
-#include <gio/gdesktopappinfo.h>
 #include <gio/gio.h>
 #include <glib/gi18n-lib.h>
 #include <mutex>
@@ -51,6 +50,10 @@
 #include <WebCore/GtkVersioning.h>
 #endif

+#if OS(UNIX) && !OS(DARWIN)
+#include <gio/gdesktopappinfo.h>
+#endif
+
 namespace WebKit {

 static const Seconds s_dbusCallTimeout = 20_ms;
@@ -294,6 +297,7 @@ void NotificationService::processCapabilities(GVariant* variant)
 static const char* applicationIcon(const char* applicationID)
 {
     static std::optional<CString> appIcon;
+#if OS(UNIX) && !OS(DARWIN)
     if (!appIcon) {
         appIcon = [applicationID]() -> CString {
             if (!applicationID)
@@ -328,6 +332,7 @@ static const char* applicationIcon(const char* applicationID)
             return { };
         }();
     }
+#endif // OS(UNIX) && !OS(DARWIN)

     return appIcon->data();
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221205/c9af9030/attachment.htm>


More information about the webkit-unassigned mailing list