What's up with KRun::runCommand?
Vishesh Handa
me at vhanda.in
Mon Aug 26 21:52:48 UTC 2013
Hey David
I was trying to port kmimetypechooser away from KRun, so I started to look at
the implementation of KRun. It seems to be somewhat strange -
bool KRun::runCommand(const QString& cmd, const QString &execName,
const QString & iconName,
QWidget* window, const QByteArray& asn, const QString&
workingDirectory)
{
//qDebug() << "runCommand " << cmd << "," << execName;
KProcess * proc = new KProcess;
proc->setShellCommand(cmd);
if (!workingDirectory.isEmpty()) {
proc->setWorkingDirectory(workingDirectory);
}
QString bin = binaryName(execName, true);
KService::Ptr service = KService::serviceByDesktopName(bin);
return runCommandInternal(cmd, service.data(),
execName /*executable to check for in
slotProcessExited*/,
execName /*user-visible name*/,
iconName, window, asn, workingDirectory);
}
It seems that the KProcess is created and then not used at all. The git log
doesn't seem to reveal much. Could you please take look?
--
Vishesh Handa
More information about the Kde-frameworks-devel
mailing list