Commit 9d58f4a8 authored by Dominik Haumann's avatar Dominik Haumann Committed by Christoph Cullmann
Browse files

External Tools: Trim executable, name and command name

Without trimming, e.g. the executable cannot be found,
and the external tool does not appear as consequence.
parent 4ae5e3e4
......@@ -358,9 +358,9 @@ bool KateExternalToolsConfigWidget::editTool(KateExternalTool *tool)
KateExternalToolServiceEditor editor(tool, m_plugin, this);
editor.resize(m_config->group("Editor").readEntry("Size", QSize()));
if (editor.exec() == QDialog::Accepted) {
tool->name = editor.ui->edtName->text();
tool->name = editor.ui->edtName->text().trimmed();
tool->icon = editor.ui->btnIcon->icon();
tool->executable = editor.ui->edtExecutable->text();
tool->executable = editor.ui->edtExecutable->text().trimmed();
tool->arguments = editor.ui->edtArgs->text();
tool->input = editor.ui->edtInput->toPlainText();
tool->workingDir = editor.ui->edtWorkingDir->text();
......@@ -372,7 +372,7 @@ bool KateExternalToolsConfigWidget::editTool(KateExternalTool *tool)
tool->saveMode = static_cast<KateExternalTool::SaveMode>(editor.ui->cmbSave->currentIndex());
tool->reload = editor.ui->chkReload->isChecked();
tool->outputMode = static_cast<KateExternalTool::OutputMode>(editor.ui->cmbOutput->currentIndex());
tool->cmdname = editor.ui->edtCommand->text();
tool->cmdname = editor.ui->edtCommand->text().trimmed();
// sticky action collection name, never changes again, so that shortcuts stay
if (tool->actionName.isEmpty()) {
......
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