diff options
Diffstat (limited to 'tests/hawd/dataset.cpp')
-rw-r--r-- | tests/hawd/dataset.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/hawd/dataset.cpp b/tests/hawd/dataset.cpp index fb2d7e6..62fa0d7 100644 --- a/tests/hawd/dataset.cpp +++ b/tests/hawd/dataset.cpp | |||
@@ -77,6 +77,11 @@ void Dataset::Row::setValue(const QString &col, const QVariant &value) | |||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | QVariant Dataset::Row::value(const QString &col) const | ||
81 | { | ||
82 | return m_data.value(col); | ||
83 | } | ||
84 | |||
80 | void Dataset::Row::annotate(const QString ¬e) | 85 | void Dataset::Row::annotate(const QString ¬e) |
81 | { | 86 | { |
82 | m_annotation = note; | 87 | m_annotation = note; |
@@ -176,6 +181,19 @@ QString Dataset::tableHeaders(const QStringList &cols, int standardCols, const Q | |||
176 | return strings.join(seperator); | 181 | return strings.join(seperator); |
177 | } | 182 | } |
178 | 183 | ||
184 | |||
185 | QString Dataset::Row::commitHash() const | ||
186 | { | ||
187 | return m_commitHash; | ||
188 | } | ||
189 | |||
190 | QDateTime Dataset::Row::timestamp() const | ||
191 | { | ||
192 | QDateTime dt; | ||
193 | dt.setMSecsSinceEpoch(m_key); | ||
194 | return dt; | ||
195 | } | ||
196 | |||
179 | QString Dataset::Row::toString(const QStringList &cols, int standardCols, const QString &seperator) const | 197 | QString Dataset::Row::toString(const QStringList &cols, int standardCols, const QString &seperator) const |
180 | { | 198 | { |
181 | if (m_data.isEmpty()) { | 199 | if (m_data.isEmpty()) { |
@@ -185,9 +203,7 @@ QString Dataset::Row::toString(const QStringList &cols, int standardCols, const | |||
185 | QStringList strings; | 203 | QStringList strings; |
186 | 204 | ||
187 | if (standardCols & Timestamp) { | 205 | if (standardCols & Timestamp) { |
188 | QDateTime dt; | 206 | strings << timestamp().toString("yyMMdd:hhmmss").leftJustified(s_fieldWidth, ' '); |
189 | dt.setMSecsSinceEpoch(m_key); | ||
190 | strings << dt.toString("yyMMdd:hhmmss").leftJustified(s_fieldWidth, ' '); | ||
191 | } | 207 | } |
192 | 208 | ||
193 | if (standardCols & CommitHash) { | 209 | if (standardCols & CommitHash) { |