From 02bbb1f12d554ed9d424eb04a70c3ec95544a4c2 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 13 Jun 2012 19:39:37 +0200 Subject: [PATCH] Fix issue with non-starting executable --- src/Gui/CommandDoc.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index c7ea796cb..3d728e394 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -369,9 +369,17 @@ void StdCmdExportGraphviz::activated(int iMsg) QProcess proc; QStringList args; args << QLatin1String("-Tpng"); +#ifdef FC_OS_LINUX + QString path = QString::fromUtf8(hGrp->GetASCII("Graphviz", "/usr/bin").c_str()); +#else QString path = QString::fromUtf8(hGrp->GetASCII("Graphviz").c_str()); +#endif bool pathChanged = false; +#ifdef FC_OS_WIN32 QString exe = QString::fromAscii("\"%1/dot\"").arg(path); +#else + QString exe = QString::fromAscii("%1/dot").arg(path); +#endif proc.setEnvironment(QProcess::systemEnvironment()); do { proc.start(exe, args); @@ -388,7 +396,11 @@ void StdCmdExportGraphviz::activated(int iMsg) if (path.isEmpty()) return; pathChanged = true; +#ifdef FC_OS_WIN32 exe = QString::fromAscii("\"%1/dot\"").arg(path); +#else + exe = QString::fromAscii("%1/dot").arg(path); +#endif } else { if (pathChanged)