QLocale::name() concats strings while QLocale::language() returns the value
of internal private member thus there will be less memory allocations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kcalc is no more, the plasma applet (which i rewrote too) is there for such
things. for complex operations there is the plasma (krunner) plugin
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
after changes to multiple sub-projects (Katie, kdelibs, kde-workspace
and kde-extraapps) that finally happened, can write lots about it but I
will keep it short - by rewriting parts that were using js/qml (e.g. the
plasma applets) the desktop startup was reduced to half, also the legacy
tray thing shall be no more (anything that needs tray icon shall be a
plasma applet now) thus some applications and features will be dropped
aswell. see all repositories for the changes done
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
on a side note: the old KUnitConversion implementation was not thread-safe
and was causing plasma-desktop crashes because it was used in the weather
and unit conversion applets, that is no longer the case tho
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
converting the file to hex can result in way too long file name and
infinite loop in KLockFile::lock()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
O_CLOEXEC won't do it but saving the locks in /tmp or other directory that
is purged across reboot will remove stale locks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the PID check was racy, bonus points for not writing data at all to the
lock and not reading it meaning less disk I/O
oh, yes - by using O_CLOEXEC the lock is stale-safe
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the service check is racy, KLockFile is as not (assuming the combination of
O_EXCL and O_CREAT is not racy which is not KLockFile's responsibility)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
that means to get the translations linking to solid library or calling
KGlobal::locale()->insertCatalog("solid_qt") is required
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
browser shall be determinted by the preferred service for "text/html",
"application/xhtml+xml" or any other MIME type for it (that includes
scheme handlers)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
note the check if khotkeys is automatically started - it was a KDED module
not started because of XDG autostart desktop file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
cleaning up the mess, everything but KNotificationConfigWidget is
implemented.
not only does it not require additional D-Bus service (knotify) to
function but also does not transmit pixmaps over D-Bus, the features
to execute command or log to file are dropped and will not be
implemented.
also about markup support in notifications - if the server does not
support markup then it is supposed to strip it, see the spec:
https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#backwards-compat
meaning nothing should be done by KNotification itself because it is not
a server, it is just a proxy.
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
optional feature that requires "-tray" command line argument and replaces
what the `ksystraycmd` program was doing. requires "X-KDE-SysTray" entry
in the desktop file as indicator that the application supports "-tray"
argument, unlike `ksystraycmd` does not spawn extra process and even
session management will work properly for it (the argument is manually
added to the restart command)
the feature is very much tide to KMainWindow (and derived classes) but the
overhead is next to none when the "-tray" argument is not specified (the
status notifier is not created in such case) however if created an
expensive tooltip update is done whenever a window changes (may have to
look into optimizing it but then again - most of the code does nothing
unless the "-tray" argument is specified)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
palette and style shall be applied by the platform plugin, the font is
independant of the full Katana session (look for
KGlobalSettings::generalFont() for example, font from config is used here
and there because the config and thus KGlobalSettings offer fine grained
font selection for different purposes)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>