From 2f74c280ac96cd278a6e67d53ab5bae38dca1282 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 26 Nov 2014 20:34:43 +0200 Subject: [PATCH] Handle path to file with spaces on Windows. --HG-- branch : develop --- src/app/core/vapplication.cpp | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/app/core/vapplication.cpp b/src/app/core/vapplication.cpp index 5f0043ea4..c6c212e01 100644 --- a/src/app/core/vapplication.cpp +++ b/src/app/core/vapplication.cpp @@ -190,19 +190,35 @@ VApplication::~VApplication() void VApplication::NewValentina(const QString &fileName) { qCDebug(vApp)<<"Open new detached process."; - - QProcess *v = new QProcess(); - QStringList arguments; - arguments << fileName; if (fileName.isEmpty()) { - v->startDetached(QCoreApplication::applicationFilePath()); + qCDebug(vApp)<<"New process without arguments. program ="<startDetached(QCoreApplication::applicationFilePath(), arguments); + QStringList arguments; + arguments << fileName; + qCDebug(vApp)<<"New process with arguments. program ="<