diff options
| author | 2021-12-11 18:27:54 +0100 | |
|---|---|---|
| committer | 2021-12-11 18:31:23 +0100 | |
| commit | bf774bcce4d4e3ba98e8681b875fc49975fe40f5 (patch) | |
| tree | 48452299e7b86c687f2972b4048666ac0f1bc86b | |
| parent | 7be8941fc9d5b819860d80c37a7401bee60432cc (diff) | |
| download | OneRoll-bf774bcce4d4e3ba98e8681b875fc49975fe40f5.tar.gz OneRoll-bf774bcce4d4e3ba98e8681b875fc49975fe40f5.zip | |
Fix debug output.
| -rw-r--r-- | cli/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/main.cpp b/cli/main.cpp index 918636e..3298eac 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -294,7 +294,7 @@ void displayCommandResult(QString json, bool withColor) out << str << "\n"; } -int startDiceParsing(QStringList& cmds, bool withColor, EXPORTFORMAT format, QJsonArray array) +int startDiceParsing(QStringList& cmds, bool withColor, EXPORTFORMAT format, QJsonArray array, const QString& filePath) { DiceParser parser; parser.insertAlias(new DiceAlias("L5R5R", QStringLiteral("L[-,⨀,⨀⬢,❂⬢,❁,❁⬢]")), 0); @@ -439,6 +439,10 @@ int startDiceParsing(QStringList& cmds, bool withColor, EXPORTFORMAT format, QJs break; #endif } + if(!filePath.isEmpty()) + { + parser.writeDownDotTree(filePath); + } } else rt= 1; @@ -595,7 +599,7 @@ int main(int argc, char* argv[]) aliases= doc.array(); } - returnValue= startDiceParsing(cmdList, colorb, format, aliases); + returnValue= startDiceParsing(cmdList, colorb, format, aliases, dotFileStr); if(optionParser.isSet(help)) { out << optionParser.helpText(); |