mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
PlantUml/Graphviz: support relative path
This commit is contained in:
parent
0530422a9b
commit
a9005bef23
@ -4,6 +4,7 @@
|
||||
#include <QDir>
|
||||
|
||||
#include <utils/processutils.h>
|
||||
#include <utils/pathutils.h>
|
||||
|
||||
using namespace vnotex;
|
||||
|
||||
@ -38,7 +39,7 @@ void GraphvizHelper::prepareProgramAndArgs(const QString &p_graphvizFile,
|
||||
p_program.clear();
|
||||
p_args.clear();
|
||||
|
||||
p_program = p_graphvizFile.isEmpty() ? QStringLiteral("dot") : QDir::toNativeSeparators(p_graphvizFile);
|
||||
p_program = p_graphvizFile.isEmpty() ? QStringLiteral("dot") : QDir::toNativeSeparators(PathUtils::absolutePath(p_graphvizFile));
|
||||
}
|
||||
|
||||
QPair<bool, QString> GraphvizHelper::testGraphviz(const QString &p_graphvizFile)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QDir>
|
||||
|
||||
#include <utils/processutils.h>
|
||||
#include <utils/pathutils.h>
|
||||
|
||||
using namespace vnotex;
|
||||
|
||||
@ -61,12 +62,12 @@ void PlantUmlHelper::prepareProgramAndArgs(const QString &p_plantUmlJarFile,
|
||||
p_args << "-Djava.awt.headless=true";
|
||||
#endif
|
||||
|
||||
p_args << "-jar" << QDir::toNativeSeparators(p_plantUmlJarFile);
|
||||
p_args << "-jar" << QDir::toNativeSeparators(PathUtils::absolutePath(p_plantUmlJarFile));
|
||||
|
||||
p_args << "-charset" << "UTF-8";
|
||||
|
||||
if (!p_graphvizFile.isEmpty()) {
|
||||
p_args << "-graphvizdot" << QDir::toNativeSeparators(p_graphvizFile);
|
||||
p_args << "-graphvizdot" << QDir::toNativeSeparators(PathUtils::absolutePath(p_graphvizFile));
|
||||
}
|
||||
|
||||
p_args << "-pipe";
|
||||
|
Loading…
x
Reference in New Issue
Block a user