Currently we are very inconsistent with how we handle our various X11 dependencies.
Some places check whether specific sub-libraries are found and disable parts of the code accordingly.
Sometimes this is controlled by whether X11 is found at all, sometimes it depends on the sublibrary being present.
Some of this is obviously broken, e.g. in one like we check whether X11 is there and then use it unconditionally a few lines down.
Instead of the current system of optional deps and deps being conditional on other deps I propose that we introduce an explicit build option that controls the X11 support.
If on (the default) then all X11 libs are required.
If off then no X11 libs are searched for. Currently this results in a broken build since some places use X11 stuff unconditionally, but it gives us an easier way to test and fix those cases.
KInit will be gone in KF6. However, we still need to update a KF5 KLauncher
for the time being, for KF5-based apps running in a Plasma 6 session. All
we need for that is a copy of the D-Bus interface definition though.
Without this, ninja fails to regenerate at times:
https://gitlab.kitware.com/cmake/cmake/-/issues/21977
It happens because we fail to transfer to the replaced file the
properties that the different macros have set to the original.
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.