diff options
author | Till Adam <till@kdab.net> | 2009-09-03 18:15:03 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-13 08:41:46 (GMT) |
commit | 04fb09581891c8bab912eb03a40eeda4d2211bc7 (patch) | |
tree | 383ee196836bae6f82309430c27d815e3352c82d /src/testlib/qtest.h | |
parent | b2f2967411bcb23a807f6a17b042b4c58701af95 (diff) | |
download | Qt-04fb09581891c8bab912eb03a40eeda4d2211bc7.zip Qt-04fb09581891c8bab912eb03a40eeda4d2211bc7.tar.gz Qt-04fb09581891c8bab912eb03a40eeda4d2211bc7.tar.bz2 |
Fix compilation with QT_NO_CAST_FROM_BYTEARRAY.
Merge-request: 1421
Reviewed-By: Thiago Macieira <thiago.macieira@nokia.com>
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"); } |