diff options
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r-- | common/typeindex.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp index 78195d3..b96c5b5 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp | |||
@@ -27,7 +27,10 @@ SINK_DEBUG_AREA("typeindex") | |||
27 | static QByteArray getByteArray(const QVariant &value) | 27 | static QByteArray getByteArray(const QVariant &value) |
28 | { | 28 | { |
29 | if (value.type() == QVariant::DateTime) { | 29 | if (value.type() == QVariant::DateTime) { |
30 | return value.toDateTime().toString().toLatin1(); | 30 | const auto result = value.toDateTime().toString().toLatin1(); |
31 | if (result.isEmpty()) { | ||
32 | return "nodate"; | ||
33 | } | ||
31 | } | 34 | } |
32 | if (value.isValid() && !value.toByteArray().isEmpty()) { | 35 | if (value.isValid() && !value.toByteArray().isEmpty()) { |
33 | return value.toByteArray(); | 36 | return value.toByteArray(); |