it has to be done only once (because it calls global static to translate),
does not have thread requirement (QCoreApplication locks when installing
or removing translator) and it checks if KGlobal has locale via
KGlobal::hasLocale() to ensure it is not attempting to call
KGlobal::locale() after KGlobal destruction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
altought KPixmap is used mostly for pixmaps with depth equal to 32 not
being able to convert pixmaps with other depth may be a surprise so use
QPixmap::fromX11Pixmap() in KPixmap::toImage() just in case
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
very much written for use case, not to make sense. while porting to it I
already noticed there are leaks for X11 pixmaps and may have to write
glue code to keep track of the pixmaps and release them before
application quits, that will be a huge performance penalty tho so may
have to be ifdef'ed for debug builds only
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
there are 3 copies of the sources for that class because it is not
exported (one here, one in kde-workspace and one in kde-extraapps) with
one class that is very similar to it - PanelShadows (in kde-workspace
repo, part of plasmagenericshell library)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
if both the destroy and selection clearing are delivered (in that order) to
selection poller, the poller selection may be cleared
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
at the point where the application is about to exit it is not safe to even
access the global static (by calling Plasma::Theme::defaultTheme()) since
it will be deleted
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
ideally, the keys would also be stored in the .desktop files so that
plugin instances would not have to be created from
KFileMetaInfo::supportedKeys() too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the XDG path is be used instead, the custom autostart path was for programs
and scripts which is not feature mentioned in the spec
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
fixes runtime warning about empty data for invalid catalogs (e.g. when
translations are not installed either for the language requested or at all)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the goal is to make kdeinit4 do only startup, i.e. XDG-like startup and
KCM modules initialization (which currently kcminit does). klauncher
(which is part of kdeinit4 still) shall be responsible for programs and
KIO slaves only
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
was non-operational code due to QT_NO_TRANSLATION being defined in the
kglobal source file for some reason, it has a huge impact on performance
ofcourse because anything Katie will attempt to translate will go trough it
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
the catalog name argument is unused, KCatalog should be public if
translation from specific catalog is required
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>