Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7a4fdbbd authored by Pino Toscano's avatar Pino Toscano

Use right QProcess API

Use the QProcess::start() variant with explicit (empty, in these cases)
arguments, so the program strings are not parsed as shell commands,
thus preserving paths with spaces as such.
parent 1d9c6da1
......@@ -72,7 +72,7 @@ public Q_SLOTS:
private:
void launchIBusPanel() {
const QString panelPath = QStringLiteral(KIMPANEL_LIBEXEC_DIR"/kimpanel-ibus-panel");
QProcess::startDetached(panelPath);
QProcess::startDetached(panelPath, QStringList());
quit();
}
......
......@@ -40,7 +40,7 @@ static void ibusPanelLauncher() {
// lets just blindly start the launcher. no need to use ifdef
const QString path = QStringLiteral(KIMPANEL_LIBEXEC_DIR"/kimpanel-ibus-panel-launcher");
if (QFile::exists(path)) {
QProcess::startDetached(path);
QProcess::startDetached(path, QStringList());
}
}
......
......@@ -128,7 +128,7 @@ void ServerConfigModule::save()
// Start Baloo
if (enabled) {
const QString exe = QStandardPaths::findExecutable(QStringLiteral("baloo_file"));
QProcess::startDetached(exe);
QProcess::startDetached(exe, QStringList());
}
else {
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.baloo"),
......@@ -141,7 +141,7 @@ void ServerConfigModule::save()
// Start cleaner
const QString exe = QStandardPaths::findExecutable(QStringLiteral("baloo_file_cleaner"));
QProcess::startDetached(exe);
QProcess::startDetached(exe, QStringList());
// Update the baloo_file's config cache
config.refresh();
......
......@@ -83,7 +83,7 @@ void CJobRunner::startDbusService()
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(OrgKdeFontinstInterface::staticInterfaceName())) {
const QString fontinst = QStringLiteral(KFONTINST_LIB_EXEC_DIR"/fontinst");
qDebug() << "Service " << OrgKdeFontinstInterface::staticInterfaceName() << " not registered, starting" << fontinst;
QProcess::startDetached(fontinst);
QProcess::startDetached(fontinst, QStringList());
}
}
......
......@@ -54,7 +54,7 @@ FontInstInterface::FontInstInterface()
connect(itsInterface, SIGNAL(fontStat(int,KFI::Family)), SLOT(fontStat(int,KFI::Family)));
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(OrgKdeFontinstInterface::staticInterfaceName()))
QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"));
QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"), QStringList());
}
FontInstInterface::~FontInstInterface()
......
......@@ -508,7 +508,7 @@ void CFontViewPart::checkInstallable()
if(itsFontDetails.family.isEmpty())
{
if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(OrgKdeFontinstInterface::staticInterfaceName()))
QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"));
QProcess::startDetached(QLatin1String(KFONTINST_LIB_EXEC_DIR"/fontinst"), QStringList());
itsInstallButton->setEnabled(false);
itsInterface->statFont(itsPreview->engine()->descriptiveName(), FontInst::SYS_MASK|FontInst::USR_MASK, getpid());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment