aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2016-01-10 17:55:32 +0100
committerRenaud G <renaud@rolisteam.org>2016-01-10 17:55:32 +0100
commit7df15a3d41d87bbed9155a5cff2fda70acbf2f0e (patch)
tree12acda80f00901f06ec72e77a2ac3aab9e03f9b2 /result
parent20812f196cfba490952d2e148b4e321c10cbad7e (diff)
parentdb15e41502743d1124062eddb8d2bb3617e2593c (diff)
downloadOneRoll-7df15a3d41d87bbed9155a5cff2fda70acbf2f0e.tar.gz
OneRoll-7df15a3d41d87bbed9155a5cff2fda70acbf2f0e.zip
merge MergeOp into master
Diffstat (limited to 'result')
-rw-r--r--result/diceresult.cpp23
-rw-r--r--result/result.cpp2
-rw-r--r--result/result.h2
3 files changed, 13 insertions, 14 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp
index 26b8ef8..37db727 100644
--- a/result/diceresult.cpp
+++ b/result/diceresult.cpp
@@ -56,19 +56,18 @@ DiceResult::~DiceResult()
}
QVariant DiceResult::getResult(RESULT_TYPE type)
{
-
switch (type)
{
- case SCALAR:
- return getScalarResult();
- break;
- case DICE_LIST:
- {
- return QVariant();
- break;
- }
- default:
- break;
+ case SCALAR:
+ {
+ return getScalarResult();
+ }
+ case DICE_LIST:
+ {
+ return QVariant();
+ }
+ default:
+ break;
}
return QVariant();
@@ -104,7 +103,7 @@ QString DiceResult::toString(bool wl)
}
if(wl)
{
- return QString("%3 [label=\"DiceResult Value %1 dice %2\"]").arg(getScalarResult()).arg(scalarSum.join('_')).arg(m_id);
+ return QStringLiteral("%3 [label=\"DiceResult Value %1 dice %2\"]").arg(getScalarResult()).arg(scalarSum.join('_')).arg(m_id);
}
else
{
diff --git a/result/result.cpp b/result/result.cpp
index 7b6633c..163d539 100644
--- a/result/result.cpp
+++ b/result/result.cpp
@@ -37,7 +37,7 @@ void Result::setPrevious(Result* p)
m_previous = p;
}
-bool Result::isStringResult()
+bool Result::isStringResult() const
{
return false;
}
diff --git a/result/result.h b/result/result.h
index 3f16535..2a5b7f9 100644
--- a/result/result.h
+++ b/result/result.h
@@ -62,7 +62,7 @@ public:
* @brief isStringResult
* @return
*/
- bool isStringResult();
+ virtual bool isStringResult() const;
/**
* @brief getStringResult