|
@@ -46,7 +46,7 @@ void VPlantUMLHelper::processAsync(int p_id,
|
|
|
QStringList args(m_args);
|
|
QStringList args(m_args);
|
|
|
args << ("-t" + p_format);
|
|
args << ("-t" + p_format);
|
|
|
qDebug() << m_program << args;
|
|
qDebug() << m_program << args;
|
|
|
- process->start(m_program, args);
|
|
|
|
|
|
|
+ process->start(m_program, refineArgsForUse(args));
|
|
|
} else {
|
|
} else {
|
|
|
QString cmd(m_customCmd);
|
|
QString cmd(m_customCmd);
|
|
|
cmd.replace("%0", p_format);
|
|
cmd.replace("%0", p_format);
|
|
@@ -143,6 +143,7 @@ bool VPlantUMLHelper::testPlantUMLJar(const QString &p_jar, QString &p_msg)
|
|
|
VPlantUMLHelper inst(p_jar);
|
|
VPlantUMLHelper inst(p_jar);
|
|
|
QStringList args(inst.m_args);
|
|
QStringList args(inst.m_args);
|
|
|
args << "-tsvg";
|
|
args << "-tsvg";
|
|
|
|
|
+ args = refineArgsForUse(args);
|
|
|
|
|
|
|
|
QString testGraph("VNote->Markdown : hello");
|
|
QString testGraph("VNote->Markdown : hello");
|
|
|
|
|
|
|
@@ -175,6 +176,7 @@ QByteArray VPlantUMLHelper::process(const QString &p_format, const QString &p_te
|
|
|
if (inst.m_customCmd.isEmpty()) {
|
|
if (inst.m_customCmd.isEmpty()) {
|
|
|
QStringList args(inst.m_args);
|
|
QStringList args(inst.m_args);
|
|
|
args << ("-t" + p_format);
|
|
args << ("-t" + p_format);
|
|
|
|
|
+ args = refineArgsForUse(args);
|
|
|
ret = VProcessUtils::startProcess(inst.m_program,
|
|
ret = VProcessUtils::startProcess(inst.m_program,
|
|
|
args,
|
|
args,
|
|
|
p_text.toUtf8(),
|
|
p_text.toUtf8(),
|
|
@@ -1109,3 +1111,23 @@ creole:
|
|
|
tryCreole(kw);
|
|
tryCreole(kw);
|
|
|
return kw;
|
|
return kw;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+QStringList VPlantUMLHelper::refineArgsForUse(const QStringList &p_args)
|
|
|
|
|
+{
|
|
|
|
|
+ if (p_args.isEmpty()) {
|
|
|
|
|
+ return QStringList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (p_args[0] == "-c") {
|
|
|
|
|
+ QStringList args;
|
|
|
|
|
+ args << p_args[0];
|
|
|
|
|
+ QString subCmd;
|
|
|
|
|
+ for (int i = 1; i < p_args.size(); ++i) {
|
|
|
|
|
+ subCmd += " " + p_args[i];
|
|
|
|
|
+ }
|
|
|
|
|
+ args << subCmd;
|
|
|
|
|
+ return args;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return p_args;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|