mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
generic: remove deprecated org.kde.KLauncher.start_service_by_name() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4f16fe642d
commit
b690586b3d
5 changed files with 0 additions and 62 deletions
|
@ -158,19 +158,6 @@ public Q_SLOTS: // METHODS
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QDBusReply<int> start_service_by_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, QString &dbusServiceName, QString &error, qint64 &pid)
|
|
||||||
{
|
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << qVariantFromValue(serviceName) << qVariantFromValue(urls) << qVariantFromValue(envs) << qVariantFromValue(startup_id) << qVariantFromValue(blind);
|
|
||||||
QDBusMessage reply = callWithArgumentList(QDBus::Block, QLatin1String("start_service_by_name"), argumentList);
|
|
||||||
if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 4) {
|
|
||||||
dbusServiceName = qdbus_cast<QString>(reply.arguments().at(1));
|
|
||||||
error = qdbus_cast<QString>(reply.arguments().at(2));
|
|
||||||
pid = qdbus_cast<qint64>(reply.arguments().at(3));
|
|
||||||
}
|
|
||||||
return reply;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QDBusReply<void> waitForSlave(int pid)
|
inline QDBusReply<void> waitForSlave(int pid)
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QList<QVariant> argumentList;
|
||||||
|
|
|
@ -689,24 +689,6 @@ void KLauncher::exec_blind(const QString &name, const QStringList &arg_list, con
|
||||||
requestDone(request);
|
requestDone(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// KDE5: remove
|
|
||||||
bool
|
|
||||||
KLauncher::start_service_by_name(const QString &serviceName, const QStringList &urls,
|
|
||||||
const QStringList &envs, const QString& startup_id, bool blind, const QDBusMessage &msg)
|
|
||||||
{
|
|
||||||
KService::Ptr service;
|
|
||||||
// Find service
|
|
||||||
if (!service)
|
|
||||||
{
|
|
||||||
requestResult.result = ENOENT;
|
|
||||||
requestResult.error = i18n("Could not find service '%1'.", serviceName);
|
|
||||||
cancel_service_startup_info( NULL, startup_id.toLocal8Bit(), envs ); // cancel it if any
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return start_service(service, urls, envs, startup_id.toLocal8Bit(), blind, false, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
KLauncher::start_service_by_desktop_path(const QString &serviceName, const QStringList &urls,
|
KLauncher::start_service_by_desktop_path(const QString &serviceName, const QStringList &urls,
|
||||||
const QStringList &envs, const QString& startup_id, bool blind, const QDBusMessage &msg)
|
const QStringList &envs, const QString& startup_id, bool blind, const QDBusMessage &msg)
|
||||||
|
|
|
@ -209,25 +209,6 @@ public: // remote methods, called by KLauncherAdaptor
|
||||||
*/
|
*/
|
||||||
bool start_service_by_desktop_path(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg);
|
bool start_service_by_desktop_path(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg);
|
||||||
|
|
||||||
/**
|
|
||||||
* Start a service by (translated) name - deprecated
|
|
||||||
*
|
|
||||||
* 'serviceName' refers to the service name as given by·
|
|
||||||
* the Name field in the desktop file describing the service.
|
|
||||||
*
|
|
||||||
* 'url', if not empty, will be passed to the service as
|
|
||||||
* argument.
|
|
||||||
*
|
|
||||||
* 'envs' are environment variables that will be added
|
|
||||||
* to this program's environment before starting it
|
|
||||||
*
|
|
||||||
* 'startup_id' is for application startup notification,
|
|
||||||
* "" is the default, "0" for none
|
|
||||||
*
|
|
||||||
* @deprecated use start_service_by_desktop_path
|
|
||||||
*/
|
|
||||||
bool start_service_by_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg); // KDE5: remove
|
|
||||||
|
|
||||||
pid_t requestHoldSlave(const KUrl &url, const QString &app_socket);
|
pid_t requestHoldSlave(const KUrl &url, const QString &app_socket);
|
||||||
|
|
||||||
pid_t requestSlave(const QString &protocol, const QString &host,
|
pid_t requestSlave(const QString &protocol, const QString &host,
|
||||||
|
|
|
@ -132,17 +132,6 @@ int KLauncherAdaptor::start_service_by_desktop_path(const QString &serviceName,
|
||||||
return p->requestResult.result;
|
return p->requestResult.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int KLauncherAdaptor::start_service_by_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid)
|
|
||||||
{
|
|
||||||
// handle method call org.kde.KLauncher.start_service_by_name
|
|
||||||
KLauncher *p = static_cast<KLauncher *>(parent());
|
|
||||||
p->start_service_by_name(serviceName, urls, envs, startup_id, blind, msg);
|
|
||||||
dbusServiceName = p->requestResult.dbusName;
|
|
||||||
error = p->requestResult.error;
|
|
||||||
pid = p->requestResult.pid;
|
|
||||||
return p->requestResult.result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLauncherAdaptor::waitForSlave(qint64 pid, const QDBusMessage &msg)
|
void KLauncherAdaptor::waitForSlave(qint64 pid, const QDBusMessage &msg)
|
||||||
{
|
{
|
||||||
// handle method call org.kde.KLauncher.waitForSlave
|
// handle method call org.kde.KLauncher.waitForSlave
|
||||||
|
|
|
@ -59,7 +59,6 @@ public Q_SLOTS: // METHODS
|
||||||
int start_service_by_desktop_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
|
int start_service_by_desktop_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
|
||||||
int start_service_by_desktop_path(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
|
int start_service_by_desktop_path(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
|
||||||
// Deprecated, to be removed in KDE5.
|
// Deprecated, to be removed in KDE5.
|
||||||
int start_service_by_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
|
|
||||||
void waitForSlave(qint64 pid, const QDBusMessage &msg);
|
void waitForSlave(qint64 pid, const QDBusMessage &msg);
|
||||||
void terminate_kdeinit();
|
void terminate_kdeinit();
|
||||||
Q_SIGNALS: // SIGNALS
|
Q_SIGNALS: // SIGNALS
|
||||||
|
|
Loading…
Add table
Reference in a new issue