From 1bc658b7ba75cae4362ff728d6044a18a169ea1f Mon Sep 17 00:00:00 2001 From: Giorgi Gzirishvili Date: Sun, 14 Jan 2018 19:25:11 +0400 Subject: [PATCH] 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. --- src/capture/workers/launcher/applauncherwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/capture/workers/launcher/applauncherwidget.cpp b/src/capture/workers/launcher/applauncherwidget.cpp index c07c49f5..6bf511d5 100644 --- a/src/capture/workers/launcher/applauncherwidget.cpp +++ b/src/capture/workers/launcher/applauncherwidget.cpp @@ -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) {