diff options
| author | 2018-02-24 17:06:10 +0100 | |
|---|---|---|
| committer | 2018-02-24 17:06:10 +0100 | |
| commit | ff78f313abd4839b77f17255b79dd4499bce0512 (patch) | |
| tree | bca17428464e6184a34f382bf28b3c3204b16519 /diceparser.cpp | |
| parent | 4eeb6ff50f3153c3e139507d99efdf2bc1b9314c (diff) | |
| download | OneRoll-ff78f313abd4839b77f17255b79dd4499bce0512.tar.gz OneRoll-ff78f313abd4839b77f17255b79dd4499bce0512.zip | |
-remove warnings
Diffstat (limited to 'diceparser.cpp')
| -rw-r--r-- | diceparser.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/diceparser.cpp b/diceparser.cpp index 24bf3c4..311b3a4 100644 --- a/diceparser.cpp +++ b/diceparser.cpp @@ -147,7 +147,7 @@ void DiceParser::insertAlias(DiceAlias* dice, int i) } } -bool DiceParser::parseLine(QString str) +bool DiceParser::parseLine(QString str, bool allowAlias) { m_errorMap.clear(); if(!m_startNodes.empty()) @@ -156,7 +156,10 @@ bool DiceParser::parseLine(QString str) m_startNodes.clear(); } m_currentTreeHasSeparator=false; - str = convertAlias(str); + if(allowAlias) + { + str = convertAlias(str); + } m_command = str; bool hasInstruction = readInstructionList(str); @@ -166,8 +169,8 @@ bool DiceParser::parseLine(QString str) } else { - m_errorMap.insert(ExecutionNode::NOTHING_UNDERSTOOD,QObject::tr("Nothing was understood. To roll dice: !1d6 - full documation:" - "https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md")); + m_errorMap.insert(ExecutionNode::NOTHING_UNDERSTOOD,QObject::tr("Nothing was understood. To roll dice: !1d6 - full documation: " + "<a href=\"https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md\">https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md</a>")); } return false; } |