aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result/stringresult.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2021-05-15 06:57:22 +0200
committerRenaud G <renaud@rolisteam.org>2021-05-15 06:57:22 +0200
commit03a443cb5f4269aa9c6a9c3dc2efcfc30b913703 (patch)
treeeec10b5f0c205f5a6d56ac35fdd8657f125e1338 /result/stringresult.cpp
parentf7782a8dffe60e2ee5698bc54443dcb54e8f9a42 (diff)
downloadOneRoll-03a443cb5f4269aa9c6a9c3dc2efcfc30b913703.tar.gz
OneRoll-03a443cb5f4269aa9c6a9c3dc2efcfc30b913703.zip
Add feature about no comma for list operator.
Diffstat (limited to 'result/stringresult.cpp')
-rw-r--r--result/stringresult.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/result/stringresult.cpp b/result/stringresult.cpp
index d36dfc7..113c22c 100644
--- a/result/stringresult.cpp
+++ b/result/stringresult.cpp
@@ -31,10 +31,17 @@ bool StringResult::hasResultOfType(Dice::RESULT_TYPE resultType) const
}
return val;
}
+
+void StringResult::setNoComma(bool b)
+{
+ m_commaSeparator= !b;
+}
+
QString StringResult::getText() const
{
- return m_value.join(",");
+ return m_commaSeparator ? m_value.join(",") : m_value.join(QString());
}
+
QVariant StringResult::getResult(Dice::RESULT_TYPE type)
{
switch(type)