mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 10:52:51 +00:00
kde-menu: do not use KToolInvocation/KLauncher to execute kbuildsycoca4
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
61965cf96f
commit
d75c15bd56
1 changed files with 2 additions and 9 deletions
|
@ -32,8 +32,6 @@
|
||||||
#include <kservice.h>
|
#include <kservice.h>
|
||||||
#include <kservicegroup.h>
|
#include <kservicegroup.h>
|
||||||
#include <kstandarddirs.h>
|
#include <kstandarddirs.h>
|
||||||
#include <ktoolinvocation.h>
|
|
||||||
#include "klauncher_iface.h"
|
|
||||||
#include <ksycoca.h>
|
#include <ksycoca.h>
|
||||||
|
|
||||||
static const char appName[] = "kde-menu";
|
static const char appName[] = "kde-menu";
|
||||||
|
@ -151,15 +149,10 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
error(4, i18n("Could not find '%1' executable.", QLatin1String(KBUILDSYCOCA_EXENAME)));
|
error(4, i18n("Could not find '%1' executable.", QLatin1String(KBUILDSYCOCA_EXENAME)));
|
||||||
}
|
}
|
||||||
QDBusMessage reply = KToolInvocation::klauncher()->call("kdeinit_exec_wait", command, args, QStringList(), QString());
|
|
||||||
if (reply.type() != QDBusMessage::ReplyMessage)
|
|
||||||
{
|
|
||||||
qWarning("Can not talk to klauncher!");
|
|
||||||
if (QProcess::execute(command, args) != 0) {
|
if (QProcess::execute(command, args) != 0) {
|
||||||
error(5, i18n("Could not execute '%1'.", QLatin1String(KBUILDSYCOCA_EXENAME)));
|
error(5, i18n("Could not execute '%1'.", QLatin1String(KBUILDSYCOCA_EXENAME)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
QString menuId = args->arg(0);
|
QString menuId = args->arg(0);
|
||||||
KService::Ptr s = KService::serviceByMenuId(menuId);
|
KService::Ptr s = KService::serviceByMenuId(menuId);
|
||||||
|
|
Loading…
Add table
Reference in a new issue