KService

Deprecated List
Class KAutostart
Since 5.87, the autostart is done inside of Plasma, apps should use the X-KDE-autostart-condition to toggle their autostart values. If the app should autostart in other desktop environments it's desktop file has to be compied to the autostart location manually.
Member KAutostart::isServiceRegistered (const QString &entryName)
Since 5.87, see class docs
Member KAutostart::isStartConditionMet (const QString &condition)
Since 5.87, see class docs
Member KAutostart::KAutostart (const QString &entryName=QString(), QObject *parent=nullptr)
Since 5.87, see class docs
Class KDBusServiceStarter
since 5.61, use D-Bus activation instead
Class KMimeTypeTrader
since 5.82. For querying applications use KApplicationTrader. For querying KParts use KParts::PartLoader. For querying plugins use KPluginLoader.
Member KMimeTypeTrader::createInstanceFromQuery (const QString &mimeType, const QString &serviceType, QObject *parent=nullptr, const QString &constraint=QString(), const QVariantList &args=QVariantList(), QString *error=nullptr)
since 5.82. For KParts use KParts::PartLoader::createPartInstanceForMimeType(). Otherwise use KPluginLoader.
Member KMimeTypeTrader::createPartInstanceFromQuery (const QString &mimeType, QWidget *parentWidget=nullptr, QObject *parent=nullptr, const QString &constraint=QString(), const QVariantList &args=QVariantList(), QString *error=nullptr)
since 5.82. For KParts use KParts::PartLoader::createPartInstanceForMimeType(). Otherwise use KPluginLoader.
Member KMimeTypeTrader::preferredService (const QString &mimeType, const QString &genericServiceType=QStringLiteral("Application"))
since 5.82. For querying applications use KApplicationTrader::preferredService(). For querying KParts use KParts::PartLoader::partsForMimeType().first().
Member KMimeTypeTrader::query (const QString &mimeType, const QString &genericServiceType=QStringLiteral("Application"), const QString &constraint=QString()) const
since 5.82. For querying applications use KApplicationTrader::query(). For querying KParts use KParts::PartLoader::partsForMimeType(). For querying plugins use KPluginLoader.
Class KPluginInfo
since 5.88, use QPluginLoader or the KPluginFactory::loadFactory/KPluginFactory::instantiatePlugins methods instead to create objects from the plugins. For accessing the metadata, use KPluginMetaData instead. To embed json metadata in your plugin, use K_PLUGIN_CLASS_WITH_JSON(MyClass, "mypluginmetadata.json")
Member KPluginInfo::fromKPartsInstanceName (const QString &componentName, const KConfigGroup &config=KConfigGroup())
since 5.81, removed for lack of usage, KParts loads the plugins all by itself
Member KPluginInfo::fromMetaData (const KPluginMetaData &meta)
Since 5.90, see class API docs
Member KPluginInfo::fromMetaData (const QVector< KPluginMetaData > &list)
Since 5.90, see class API docs
Member KPluginInfo::fromServices (const KService::List &services, const KConfigGroup &config=KConfigGroup())
Since 5.90, see class API docs
Member KPluginInfo::KPluginInfo (const QString &filename)
Since 5.90, see class API docs
Member KPluginInfo::KPluginInfo (const KService::Ptr service)
Since 5.90, see class API docs
Member KPluginInfo::KPluginInfo (const QVariantList &args, const QString &libraryPath=QString())
Since 5.90, see class API docs
Member KPluginInfo::KPluginInfo (const KPluginMetaData &md)
Since 5.90, see class API docs
Member KPluginInfo::service () const
since 5.70, use KPluginMetaData and KPluginLoader(info.libraryPath())
Member KPluginInfo::toMetaData (const KPluginInfo &info)
Since 5.90, see class API docs
Member KPluginInfo::toMetaData (const KPluginInfo::List &list)
Since 5.90, see class API docs
Member KPluginTrader::createInstanceFromQuery (const QString &subDirectory, const QString &serviceType=QString(), const QString &constraint=QString(), QObject *parent=nullptr, const QVariantList &args=QVariantList(), QString *error=nullptr)
since 5.82, use KPluginLoader API.
Member KPluginTrader::createInstanceFromQuery (const QString &subDirectory, const QString &serviceType, const QString &constraint, QObject *parent, QWidget *parentWidget, const QVariantList &args=QVariantList(), QString *error=nullptr)
since 5.82, use KPluginLoader API.
Member KPluginTrader::query (const QString &subDirectory, const QString &serviceType=QString(), const QString &constraint=QString())
since 5.82, use KPluginMetaData::findPlugins.
Member KPluginTrader::self ()
since 5.82, use KPluginMetaData and KPluginFactory.
Member KService::allowAsDefault () const
since 5.67 due to no known use case
Member KService::parentApp () const
Since 5.87, the concept of parent apps is deprecated. Plugins should use KPluginMetaData instead of KService and a dedicated namespace if the plugins are only for one app relevant.
Member KService::path () const
since 5.63, use workingDirectory() instead
Member KService::pluginKeyword () const
Since 5.87, the metadata should be embedded in the actual plugin. Consequently this property is obsolete. In case there is only one plugin in the library the usage is not needed. In case there are different base classes registered the keyword is not needed too. If there are multiple classes of a common base class registered they should be split up in separate libs.
Member KService::showInKDE () const
since 5.0, use showInCurrentDesktop()
Member KServiceAction::KServiceAction (const QString &name, const QString &text, const QString &icon, const QString &exec, bool noDisplay=false)
Since 5.69, use the 6-args constructor
Member KServiceOffer::allowAsDefault () const
since 5.67, no know use case.
Member KServiceOffer::KServiceOffer (const KService::Ptr &service, int pref, int mimeTypeInheritanceLevel, bool allowedAsDefault)
Since 5.71, use constructor without allowedAsDefault argument
Class KServiceType
Since 5.90, this class is an implementation detail of KService. Use KService or KApplicationTrader instead.
Member KServiceType::KServiceType (KDesktopFile *config)
Since 5.90, see class API docs
Member KServiceTypeProfile::writeServiceTypeProfile (const QString &serviceType, const KService::List &services, const KService::List &disabledServices=KService::List())
since 5.66, unused.
Class KServiceTypeTrader
Since 5.90. For querying plugins use KPluginMetaData::findPlugins. For querying applications use KApplicationTrader. For querying KParts use KParts::PartLoader. For querying desktop files use KFileUtils::findAllUniqueFiles and KDesktopFile.
Member KServiceTypeTrader::self ()
Since 5.90, see class API docs
Member KSycoca::databaseChanged (const QStringList &changedResources)
since 5.80, use the KSycoca::databaseChanged() signal instead.
Member KSycoca::isChanged (const char *type)
Since 5.0, use the KSycoca::databaseChanged() signal instead.
Member KToolInvocation::ensureKdeinitRunning ()
Since 5.88, kdeinit is deprecated
Member KToolInvocation::invokeBrowser (const QString &url, const QByteArray &startup_id=QByteArray())
since 5.0, use QDesktopServices::openUrl(url)
Member KToolInvocation::invokeMailer (const QUrl &mailtoURL, const QByteArray &startup_id=QByteArray(), bool allowAttachments=false)
since 5.0, use QDesktopServices::openUrl(mailtoURL)
Member KToolInvocation::invokeMailer (const QString &to, const QString &cc, const QString &bcc, const QString &subject, const QString &body, const QString &messageFile=QString(), const QStringList &attachURLs=QStringList(), const QByteArray &startup_id=QByteArray())
Since 5.89, use KEMailClientLauncherJob instead
Member KToolInvocation::invokeMailer (const QString &address, const QString &subject, const QByteArray &startup_id=QByteArray())
since 5.0, use QDesktopServices::openUrl(mailtoURL), using QUrl::setPath(address) and a query item of "subject" for the subject.
Member KToolInvocation::invokeTerminal (const QString &command, const QString &workdir=QString(), const QByteArray &startup_id="")
since 5,79, use invokeTerminal(const QString &command, const QStringList &envs, const QString &workdir, const QByteArray &startup_id) instead
Member KToolInvocation::invokeTerminal (const QString &command, const QStringList &envs, const QString &workdir=QString(), const QByteArray &startup_id="")
Since 5.89, use KTerminalLauncherJob instead
Member KToolInvocation::kdeinitExec (const QString &name, const QStringList &args=QStringList(), QString *error=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray())
since 5.83, use CommandLauncherJob instead
Member KToolInvocation::kdeinitExecWait (const QString &name, const QStringList &args=QStringList(), QString *error=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray())
since 5.88, kdeinit is deprecated, launch the executable manually
Member KToolInvocation::startServiceByDesktopName (const QString &_name, const QString &URL, QString *error=nullptr, QString *serviceName=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray(), bool noWait=false)
since 5.0 use QDBusConnectionInterface::startService("org.kde.serviceName"), to start a unique application in order to make D-Bus calls to it (after ensuring that it installs a D-Bus org.kde.serviceName.service file). Otherwise just use QProcess, KIO::CommandLauncherJob or KIO::ApplicationLauncherJob.
Member KToolInvocation::startServiceByDesktopName (const QString &_name, const QStringList &URLs=QStringList(), QString *error=nullptr, QString *serviceName=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray(), bool noWait=false)
since 5.0 use QDBusConnectionInterface::startService("org.kde.serviceName"), to start a unique application in order to make D-Bus calls to it (after ensuring that it installs a D-Bus org.kde.serviceName.service file). Otherwise just use QProcess, KIO::CommandLauncherJob or KIO::ApplicationLauncherJob.
Member KToolInvocation::startServiceByDesktopPath (const QString &_name, const QStringList &URLs=QStringList(), QString *error=nullptr, QString *serviceName=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray(), bool noWait=false)
since 5.0 use QDBusConnectionInterface::startService("org.kde.serviceName"), to start a unique application in order to make D-Bus calls to it (after ensuring that it installs a D-Bus org.kde.serviceName.service file). Otherwise just use QProcess, KIO::CommandLauncherJob or KIO::ApplicationLauncherJob.
Member KToolInvocation::startServiceByDesktopPath (const QString &_name, const QString &URL, QString *error=nullptr, QString *serviceName=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray(), bool noWait=false)
since 5.0 use QDBusConnectionInterface::startService("org.kde.serviceName"), to start a unique application in order to make D-Bus calls to it (after ensuring that it installs a D-Bus org.kde.serviceName.service file). Otherwise just use QProcess, KIO::CommandLauncherJob or KIO::ApplicationLauncherJob.
Member KToolInvocation::startServiceByName (const QString &_name, const QString &URL, QString *error=nullptr, QString *serviceName=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray(), bool noWait=false)
Since 5.0, use startServiceByDesktopName or startServiceByDesktopPath
Member KToolInvocation::startServiceByName (const QString &_name, const QStringList &URLs=QStringList(), QString *error=nullptr, QString *serviceName=nullptr, int *pid=nullptr, const QByteArray &startup_id=QByteArray(), bool noWait=false)
Since 5.0, use startServiceByDesktopName or startServiceByDesktopPath
Member KToolInvocation::terminalApplication (const QString &command=QString(), const QString &workingDir=QString())
Since 5.89, use KTerminalLauncherJob instead to launch the executable
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 04:22:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.