Open Program: Fix whitespace handling (#87)

Fixes errors external apps give when you have whitespaces in the file name and you try to open the file in an external editor (e.g. GIMP). This happens because whitespaces are interpreted as shell argument separators.
This commit is contained in:
Giorgi Gzirishvili
2018-01-14 19:25:11 +04:00
committed by Dharkael
parent bf9892d05e
commit 1bc658b7ba

View File

@@ -101,7 +101,7 @@ void AppLauncherWidget::launch(const QModelIndex &index) {
}
}
QString command = index.data(Qt::UserRole).toString().replace(
QRegExp("(\%.)"), m_tempFile);
QRegExp("(\%.)"), '"' + m_tempFile + '"');
bool inTerminal = index.data(Qt::UserRole+1).toBool() ||
m_terminalCheckbox->isChecked();
if (inTerminal) {