diff options
| author | 2015-08-20 12:25:21 +0200 | |
|---|---|---|
| committer | 2015-08-20 12:25:21 +0200 | |
| commit | 831f75a83ca3e5734d3c110af584a0f3bf7430e7 (patch) | |
| tree | 6417d0f3855782cd1875b701d3a117c277d7c4d4 /result/stringresult.cpp | |
| parent | 1dc11051931fd074b886a4e1fe0df5d747e87e20 (diff) | |
| download | OneRoll-831f75a83ca3e5734d3c110af584a0f3bf7430e7.tar.gz OneRoll-831f75a83ca3e5734d3c110af584a0f3bf7430e7.zip | |
add bool for toString() in result.
Diffstat (limited to 'result/stringresult.cpp')
| -rw-r--r-- | result/stringresult.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/result/stringresult.cpp b/result/stringresult.cpp index 4dbd577..b7dc39d 100644 --- a/result/stringresult.cpp +++ b/result/stringresult.cpp @@ -31,7 +31,14 @@ QVariant StringResult::getResult(RESULT_TYPE type) return QVariant(); } -QString StringResult::toString() +QString StringResult::toString(bool wl) { - return QString("StringResult_value_%1").arg(getText().replace(" ","_")); + if(wl) + { + return QString("%2 [label=\"StringResult_value_%1\"]").arg(getText().replace(" ","_")).arg(m_id); + } + else + { + return m_id; + } } |