Commit 2b2aea6c authored by Kåre Särs's avatar Kåre Särs

Properly port away from deprecated QProcess::start()

BUG: 420794
parent a2415245
......@@ -219,8 +219,10 @@ void KateCTagsConfigPage::updateGlobalDB()
return;
}
QString command = QStringLiteral("%1 -f %2 %3").arg(m_confUi.cmdEdit->text(), file, targets);
m_proc.start(command, QStringList());
QString commandLine = QStringLiteral("%1 -f %2 %3").arg(m_confUi.cmdEdit->text(), file, targets);
QStringList arguments = commandLine.split(QLatin1Char(' '));
QString command = arguments.takeFirst();
m_proc.start(command, arguments);
if (!m_proc.waitForStarted(500)) {
KMessageBox::error(nullptr, i18n("Failed to run \"%1\". exitStatus = %2", command, m_proc.exitStatus()));
......
......@@ -514,9 +514,10 @@ void KateCTagsView::updateSessionDB()
return;
}
QString command = QStringLiteral("%1 -f %2 %3").arg(m_ctagsUi.cmdEdit->text(), m_ctagsUi.tagsFile->text(), targets);
m_proc.start(command, QStringList());
QString commandLine = QStringLiteral("%1 -f %2 %3").arg(m_ctagsUi.cmdEdit->text(), m_ctagsUi.tagsFile->text(), targets);
QStringList arguments = commandLine.split(QLatin1Char(' '));
QString command = arguments.takeFirst();
m_proc.start(command, arguments);
if (!m_proc.waitForStarted(500)) {
KMessageBox::error(nullptr, i18n("Failed to run \"%1\". exitStatus = %2", command, m_proc.exitStatus()));
......
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