The QStringView::to<Number>() methods in Qt5 cause one extra allocation
compared to the QStringRef counter-part. As long as we aren't on a hot
path this is probably not worth the extra #ifdef though.
This is needed due to QTextStream::setCodec being gone without replacement
in Qt6. Instead just read the one line we need here via the QFile API. The
input to this file is a raw const char*, so we can read this without
applying any text codec. There's a subtle difference to keep in mind
though, QFile::readLine includes the line break, QTextStream does not.
- Remove check for kded and confupdate stages in SplashApp, those setStage()
calls were removed a long time ago[1]
- Rename 'kinit' stage to 'startPlasma', since it's called from startplasma
- Remove startKDEInit(), it was declared but not defined anywhere, most
likely left-over from a previous refactor.
https://phabricator.kde.org/R297:185afa8a3af8002172d8f5d6aa08c57244422a12
Calls to a DBus activated service can fail if the sender quits whilst
the service is spawning
(https://gitlab.freedesktop.org/dbus/dbus/-/issues/72) and using
dbus-daemon.
This is a lazy interim fix that just makes these calls block as proper
fixes will require more work.
BUG: 432460
It gives issues with systemd to try and pass it env var names with eg.
'%' in them. That to such a degree that if invalid names are passed,
none are set [1]. This change ensures compatibility by skipping any
non-alphanumerical (and _) variable names.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1754395
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
With newer systemd versions (since 246), getting the "CanMultiSession" property
doesn't work anymore.
It's hidden and always true, see 8f8cc84ba4
and c2b178d3ca
So let's just assume that it's supported if the property is invalid.
BUG: 427777
FIXED-IN: 5.20.3
The test for whether "/auto" is supported was bogus.
QDBusAbstractInterface::isValid effectively just confirms the service
exists and the path is a legally valid name, not that it has any
interfaces there.
This means the fallback path is not run appropriately.
BUG: 423526
This method calls doesn't seem to work anymore having been replaced by
the more intuitve virtual paths on the logind over a year ago.
Arguably that's still a bug upstream that GetSessionByPID no longer
works correctly, but we may as well port to the simpler path that avoids
so many layers of indirection.
Use of "/auto" does not exist on old distros so the legacy path is kept.
The paths used in this class were always wrong, which went unnoticed as
this is the first usage of them.
BUG: 423526
Commit 19c06e7293 removed setting dpy,
but it is still used in the NewKDM and OldKDM code branches.
So set it again, and add a check that it's not empty where relevant.
Systemd doesn't like values containing escape sequence \033 and a fix
won't be accepted upstream. Users of QT_MESSAGE_PATTERN might have this
set already. The big problem is then we can fail to update important
variables such as DISPLAY which all comes as one big update.
In a Plasma Wayland session, kscreenlocker_greet is started by kwin_wayland,
so it doesn't inherit $DISPLAY currently. Additionally, there might not even
be an Xwayland instance running.
Remove the only non-optional use of $DISPLAY and drop the requirement.