This avoids showing paths like /tmp/somefile as "500 GiB Internal
Hard Drive/tmp/somefile", or "Root/tmp/somefile".
It's more sensible to show the actual path in this case.
After leaving "Do not disturb" mode, a flood of on-screen notifications
ensues, causing the right-hand side of the screen to be full of rapidly
scrolling and disappearing notifications for the next minute.
The user doesn't need to see any notification popup that is suppressed
by DnD mode, because the notification can be viewed from the drawer anyway.
BUG: 440837
FIXED-IN: 5.25
Qt6 insists on that. We can do this either by including the moc files,
or by including the corresponding headers in the header defining the
properties, the former seems cleaner.
This is for jobs, such as "Loading archive" or "Examining..."
which are purely informational and provide no meaningful
action once finished. When this property is set, a job will
not show a "Finished" notification when finished successfully.
Normally you wouldn't see this because a copy job has a `destUrl`
(which is why I didn't notice) but when removing the filename to "go up"
we need to strip the trailing slash, too.
This ensures that the first `update()` call with the summary will be shown
atomically to the user rather than show an empty job popup briefly.
Also handle the delay on a per-job basis, previously there was a common
timer, which made no sense.
There is no conceivable use case for turning this off, and the UI is
being removed in https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/447.
So let's remove the backend code too, or else anyone who for some reason
had turned it off would be left without a GUI method of turning it back
on again.
Also keep `created()` with the original notification.
As per spec a notification must be replaced atomically with no visual cues.
Transfer over properties that might cause this, such as unread showing the bell again.
xdg-desktop-portal forwards appId only for sandboxed apps it can trust,
essentially blocking us from posting an inhibition from xdg-desktop-portal
as we wouldn't have an app.
This allows a client to mark a notification as "resident" which means it will
not be closed by the sever when expired or an action is invoked, thus transferring
full control over notification life time to the client.
A notification popup still times out as normal (unless persistent, of course)
but the notification remains alive until the client revokes it or a user
explicitly closes it.
It is opt-in so that a client can expect the notification lifetime to be
indefinite and explicitly close it when an action is invoked on its end.