D22365: KNotification macOS native support by NSNotificationCenter
René J.V. Bertin
noreply at phabricator.kde.org
Thu Jul 18 09:48:43 BST 2019
rjvbb added a comment.
Kai Uwe Broulik wrote on 20190718::07:13:16 re: "D22365 <https://phabricator.kde.org/D22365>: KNotification macOS native support by NSNotificationCenter"
> Thanks a lot!
Indeed. I've looked a few times in doing this myself but was never convinced that the amount of work was justified and some aspects seemed just impossible (like the kind of control over notification buttons that is expected in a KNotification, IIRC).
(IOW I'll reserve my opinion whether or not I'll be happy with the native behaviour over what I've gotten used to ;))
Summer holidays are never a good time for me to get involved in coding/review efforts but I'll see if I can test this next week. Provided the NSNotification code still builds on my ageing 10.9 install...
>> notifybymacosnotificationcenter.mm:162
>> +
>> + CFStringRef cfTitle = notification->title().toCFString(),
>> + cfText = notification->text().toCFString();
>
> Why not just `toNSString()`, given you convert it below anyway? Or is that ObjC awful ownership model quirk?
CFString and NSString are supposed to be "toll-free bridged" so you can cast freely between them. I agree, if you need an NSString just use toNSString(); if anything the extra detour might lead to ARC quirks.
>> + close(notification);
>> + notify(notification, config);
>
> Is there no way to transparently update a notification?
TBH I'd be surprised if there were.
REPOSITORY
R289 KNotifications
REVISION DETAIL
https://phabricator.kde.org/D22365
To: Inoki, rjvbb
Cc: broulik, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190718/247bfee8/attachment.html>
More information about the Kde-frameworks-devel
mailing list