From 62b7114ce29af10395273acec8dffeb41f255145 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 19 Jun 2020 08:54:57 +0200 Subject: change the way diceparser is giving its result. --- diceroller.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'diceroller.cpp') diff --git a/diceroller.cpp b/diceroller.cpp index 3d91f3e..cba24df 100644 --- a/diceroller.cpp +++ b/diceroller.cpp @@ -101,14 +101,14 @@ QString DiceRoller::diceToText(QList& diceList) } void DiceRoller::start() { - if(m_diceparser.parseLine(m_command)) + /*if(m_diceparser.parseLine(m_command)) { m_diceparser.start(); - if(m_diceparser.getErrorMap().isEmpty()) + if(m_diceparser.errorMap().isEmpty()) { bool homogeneous; QList list; - m_diceparser.getLastDiceResult(list, homogeneous); + m_diceparser.lastDiceResult(list, homogeneous); QString diceText= diceToText(list); QString scalarText; QString str; @@ -117,7 +117,7 @@ void DiceRoller::start() QString resultStr; if(m_diceparser.hasIntegerResultNotInFirst()) { - auto values= m_diceparser.getLastIntegerResults(); + auto values= m_diceparser.lastIntegerResults(); QStringList strLst; for(auto& val : values) { @@ -169,7 +169,7 @@ void DiceRoller::start() { auto errors= m_diceparser.getErrorMap(); setError(errors.first()); - } + }*/ } QString DiceRoller::getError() const @@ -185,4 +185,3 @@ void DiceRoller::setError(const QString& error) m_error= error; emit errorOccurs(); } - -- cgit v1.2.3-70-g09d2