From ff78f313abd4839b77f17255b79dd4499bce0512 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 24 Feb 2018 17:06:10 +0100 Subject: -remove warnings --- diceparser.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'diceparser.cpp') 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: " + "https://github.com/Rolisteam/DiceParser/blob/master/HelpMe.md")); } return false; } -- cgit v1.2.3-70-g09d2