mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
generic: fix regressions since f1cfe7bdba
do not use hardcoded date executable path while at it Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
73b37d03de
commit
3cc7924be3
3 changed files with 6 additions and 3 deletions
|
@ -339,7 +339,8 @@ getDate(const char *str)
|
|||
{
|
||||
QProcess prc;
|
||||
prc.setReadChannel(QProcess::StandardOutput);
|
||||
if (prc.execute("/bin/date", QStringList() << "+%s" << "-d" << str))
|
||||
prc.start("date", QStringList() << "+%s" << "-d" << str);
|
||||
if (!prc.waitForFinished() || prc.exitCode() != 0)
|
||||
return -1;
|
||||
return prc.readAll().simplified().toInt();
|
||||
}
|
||||
|
|
|
@ -128,7 +128,8 @@ void MimeTypeWriter::runUpdateMimeDatabase()
|
|||
const QString localPackageDir = KStandardDirs::locateLocal("xdgdata-mime", QString());
|
||||
Q_ASSERT(!localPackageDir.isEmpty());
|
||||
QProcess proc;
|
||||
if (!proc.execute("update-mime-database", QStringList() << localPackageDir)) {
|
||||
proc.start("update-mime-database", QStringList() << localPackageDir);
|
||||
if (!proc.waitForFinished() || proc.exitCode() != 0) {
|
||||
kWarning() << "update-mime-database exited with error code" << proc.exitCode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -360,7 +360,8 @@ private: // helper methods
|
|||
QObject::connect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), &loop, SLOT(quit()));
|
||||
QProcess proc;
|
||||
proc.setProcessChannelMode(QProcess::MergedChannels); // silence kbuildsycoca output
|
||||
proc.execute(KStandardDirs::findExe(KBUILDSYCOCA_EXENAME));
|
||||
proc.start(KStandardDirs::findExe(KBUILDSYCOCA_EXENAME));
|
||||
proc.waitForFinished();
|
||||
loop.exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue