diff options
Diffstat (limited to 'src/testlib/qtest.h')
-rw-r--r-- | src/testlib/qtest.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h index 412ad86..5171d3a 100644 --- a/src/testlib/qtest.h +++ b/src/testlib/qtest.h @@ -88,14 +88,14 @@ template<> inline char *toString(const QByteArray &ba) template<> inline char *toString(const QTime &time) { return time.isValid() - ? qstrdup(time.toString(QLatin1String("hh:mm:ss.zzz")).toLatin1()) + ? qstrdup(time.toString(QLatin1String("hh:mm:ss.zzz")).toLatin1().constData()) : qstrdup("Invalid QTime"); } template<> inline char *toString(const QDate &date) { return date.isValid() - ? qstrdup(date.toString(QLatin1String("yyyy/MM/dd")).toLatin1()) + ? qstrdup(date.toString(QLatin1String("yyyy/MM/dd")).toLatin1().constData()) : qstrdup("Invalid QDate"); } @@ -103,7 +103,7 @@ template<> inline char *toString(const QDateTime &dateTime) { return dateTime.isValid() ? qstrdup((dateTime.toString(QLatin1String("yyyy/MM/dd hh:mm:ss.zzz")) + - (dateTime.timeSpec() == Qt::LocalTime ? QLatin1String("[local time]") : QLatin1String("[UTC]"))).toLatin1()) + (dateTime.timeSpec() == Qt::LocalTime ? QLatin1String("[local time]") : QLatin1String("[UTC]"))).toLatin1().constData()) : qstrdup("Invalid QDateTime"); } |