Fix external launch of executables with spaces in paths[windows]

Authored by kfunk on Jul 4 2017, 4:33 PM.

Description

Fix external launch of executables with spaces in paths[windows]

Summary:
Instead of first splitting the arguments, and replacing %exe and %workdir by their quoted values,
they are replaced first and split later which strips the command of \^" at beginning and end.

Test Plan:
Executing in external terminal works fine after the patch:
-when executable path contains spaces (on both windows and linux.)
-when it does not contain any spaces.
before:


after:

External terminal command used was: cmd /c start "" call %exe

Reviewers: KDevelop, brauch

Reviewed By: KDevelop, brauch

Subscribers: brauch, kdevelop-devel

Differential Revision: https://phabricator.kde.org/D6505