mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kdeui: do not create startup ID from KToolInvocation
KToolInvocation does not check if the application/service that is to be started actually supports startup notification, it is done by KLauncher and KRun tho (as it should be) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a637b54384
commit
d03b3a3f47
1 changed files with 2 additions and 7 deletions
|
@ -112,7 +112,6 @@ int KToolInvocation::startServiceInternal(const char *_function,
|
||||||
QString function = QString::fromLatin1(_function);
|
QString function = QString::fromLatin1(_function);
|
||||||
// make sure there is id, so that user timestamp exists
|
// make sure there is id, so that user timestamp exists
|
||||||
QStringList envs;
|
QStringList envs;
|
||||||
QByteArray asn = startup_id;
|
|
||||||
if (QX11Info::display()) {
|
if (QX11Info::display()) {
|
||||||
const QString dpystring = QString::fromLatin1(XDisplayString(QX11Info::display()));
|
const QString dpystring = QString::fromLatin1(XDisplayString(QX11Info::display()));
|
||||||
envs << QLatin1String("DISPLAY=") + dpystring;
|
envs << QLatin1String("DISPLAY=") + dpystring;
|
||||||
|
@ -123,18 +122,14 @@ int KToolInvocation::startServiceInternal(const char *_function,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asn.isEmpty()) {
|
|
||||||
asn = KStartupInfo::createNewStartupId();
|
|
||||||
}
|
|
||||||
|
|
||||||
QDBusPendingReply<int> reply;
|
QDBusPendingReply<int> reply;
|
||||||
if (qstrcmp(_function, "kdeinit_exec_with_workdir") == 0) {
|
if (qstrcmp(_function, "kdeinit_exec_with_workdir") == 0) {
|
||||||
reply = klauncherIface->asyncCall(
|
reply = klauncherIface->asyncCall(
|
||||||
function, name, URLs, envs, QString::fromLatin1(asn, asn.size()), workdir
|
function, name, URLs, envs, QString::fromLatin1(startup_id, startup_id.size()), workdir
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
reply = klauncherIface->asyncCall(
|
reply = klauncherIface->asyncCall(
|
||||||
function, name, URLs, envs, QString::fromLatin1(asn, asn.size())
|
function, name, URLs, envs, QString::fromLatin1(startup_id, startup_id.size())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
kDebug() << "Waiting for klauncher call to finish" << function;
|
kDebug() << "Waiting for klauncher call to finish" << function;
|
||||||
|
|
Loading…
Add table
Reference in a new issue