Bug 498578

Summary: Notification with title only suffixed with colon (p!n)
Product: [Applications] kdeconnect Reporter: John Veness <john.kde>
Component: plasmoidAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 24.12.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Notifications as seen on mobile
Notifications as seen on desktop

Description John Veness 2025-01-12 22:14:39 UTC
SUMMARY
Notifications from an app called p!n which have a title only, appear in the Plasma desktop with a trailing ":".

STEPS TO REPRODUCE
1. Install p!n on Android phone (https://f-droid.org/en/packages/de.nproth.pin/)
2. Create a notification using the app with text "qwerty"
3. Open the KDE Connect system tray app on the desktop

OBSERVED RESULT
On the mobile, the notification appears as "qwerty". On the desktop, it appears as "qwerty:". See attached screenshots.

EXPECTED RESULT
On both the mobile and desktop, the notification appears as "qwerty".

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250109
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.8-2-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Manufacturer: HP
Product Name: HP ProBook 450 G4

ADDITIONAL INFORMATION
I see code at https://invent.kde.org/network/kdeconnect-kde/-/blob/master/plugins/notifications/notification.cpp#L101 which looks like it should only be adding the colon if m_text.IsEmpty() is false. I haven't debugged this but I wonder if maybe m_text contains just blank spaces, so isn't really empty, and if so, whether you can check for that. Thanks!
Comment 1 John Veness 2025-01-12 22:15:05 UTC
Created attachment 177305 [details]
Notifications as seen on mobile
Comment 2 John Veness 2025-01-12 22:15:51 UTC
Created attachment 177306 [details]
Notifications as seen on desktop