Make KAccess a regular startup application

Also ports it away from KToolInvocation.
I don't really see why it would have to start that early in the process?

Differential Revision: https://phabricator.kde.org/D28703
This commit is contained in:
Kai Uwe Broulik 2020-04-14 14:56:02 +02:00
parent 4b87247fa3
commit 6df845ee53
4 changed files with 4 additions and 20 deletions

View file

@ -30,5 +30,5 @@ install(TARGETS kaccess ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
install( FILES kaccess.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
install( FILES kaccess.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR} )
install( FILES kaccess.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )

View file

@ -92,6 +92,4 @@ Name[zh_CN]=KDE 辅助工具
Name[zh_TW]=KDE 無障礙工具
Exec=kaccess
X-DBUS-StartupType=None
X-KDE-Library=kcm_access
X-KDE-ParentApp=kcontrol
X-DocPath=kcontrol/kcmaccess/index.html
X-KDE-autostart-phase=0

View file

@ -35,7 +35,6 @@
#include <kkeyserver.h>
#include <knotifyconfigwidget.h>
#include <KPluginFactory>
#include <ktoolinvocation.h>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
@ -450,7 +449,7 @@ void KAccessConfig::save()
// make kaccess reread the configuration
// turning a11y features off needs to be done by kaccess
// so run it to clear any enabled features and it will exit if it should
KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess"));
QProcess::startDetached(QStringLiteral("kaccess"));
emit changed(false);
}
@ -553,16 +552,5 @@ void KAccessConfig::checkAccess()
ui.timeoutDelay->setEnabled(useTimeout);
}
extern "C"
{
/* This one gets called by kcminit
*/
Q_DECL_EXPORT void kcminit_access()
{
KToolInvocation::startServiceByDesktopName(QStringLiteral("kaccess"));
}
}
#include "kcmaccess.moc"

View file

@ -2,14 +2,12 @@
Exec=kcmshell5 kcmaccess
Icon=preferences-desktop-accessibility
Type=Service
X-KDE-ServiceTypes=KCModule,KCModuleInit
X-KDE-ServiceTypes=KCModule
X-DocPath=kcontrol/kcmaccess/index.html
X-KDE-Library=kcm_access
X-KDE-Init-Symbol=kcminit_access
X-KDE-ParentApp=kcontrol
X-KDE-OnlyShowOnQtPlatforms=xcb;
X-KDE-Init-Phase=0
X-KDE-System-Settings-Parent-Category=personalization
X-KDE-Weight=70