From b77995f1c0995ee4455a7c14cd07d8ac513b7d18 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 28 Jun 2020 15:00:39 +0200 Subject: rename API to get errorMap. --- include/diceparser.h | 9 +++++---- tests/dice/tst_dice.cpp | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/diceparser.h b/include/diceparser.h index 3f642e0..7cc4018 100644 --- a/include/diceparser.h +++ b/include/diceparser.h @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -145,17 +146,17 @@ public: * @brief getErrorList * @return */ - QMap getErrorMap(); + QMap errorMap() const; /** * @brief setPathToHelp set the path to the documentation, this path must be adatped to the lang of application etc… * @param l the path. */ void setPathToHelp(QString l); /** - * @brief getAllStringResult + * @brief allFirstResultAsString * @return */ - QStringList getAllStringResult(bool& hasAlias); + QStringList allFirstResultAsString(bool& hasAlias); /** * @brief getAllDiceResult * @param hasAlias @@ -187,7 +188,7 @@ private: * @param notthelast * @return */ - bool hasResultOfType(Dice::RESULT_TYPE, ExecutionNode* node, bool notthelast= false); + bool hasResultOfType(Dice::RESULT_TYPE, ExecutionNode* node, QVariant& value, bool notthelast= false); bool readBlocInstruction(QString& str, ExecutionNode*& resultnode); private: diff --git a/tests/dice/tst_dice.cpp b/tests/dice/tst_dice.cpp index 4c39bd4..3c31f12 100644 --- a/tests/dice/tst_dice.cpp +++ b/tests/dice/tst_dice.cpp @@ -428,7 +428,7 @@ void TestDice::wrongCommandsTest() if(a) { m_diceParser->start(); - auto map= m_diceParser->getErrorMap(); + auto map= m_diceParser->errorMap(); a= map.isEmpty(); } QCOMPARE(a, valid); @@ -466,7 +466,7 @@ void TestDice::wrongCommandsExecutionTimeTest() bool test= m_diceParser->parseLine(cmd); m_diceParser->start(); - QVERIFY2(m_diceParser->getErrorMap().isEmpty() == false || !test, cmd.toStdString().c_str()); + QVERIFY2(m_diceParser->errorMap().isEmpty() == false || !test, cmd.toStdString().c_str()); } } void TestDice::scopeDF() -- cgit v1.2.3-70-g09d2