diff options
Diffstat (limited to 'qtinterface/qt4/Qt/qtest.h')
-rw-r--r-- | qtinterface/qt4/Qt/qtest.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/qtinterface/qt4/Qt/qtest.h b/qtinterface/qt4/Qt/qtest.h index e1ce276..8754a4f 100644 --- a/qtinterface/qt4/Qt/qtest.h +++ b/qtinterface/qt4/Qt/qtest.h @@ -72,12 +72,12 @@ namespace QTest template<> inline char *toString(const QLatin1String &str) { - return qstrdup(str.latin1()); + return tqstrdup(str.latin1()); } template<> inline char *toString(const QString &str) { - return qstrdup(str.toLatin1().constData()); + return tqstrdup(str.toLatin1().constData()); } template<> inline char *toString(const QByteArray &ba) @@ -88,63 +88,63 @@ 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().constData()) - : qstrdup("Invalid QTime"); + ? tqstrdup(time.toString(QLatin1String("hh:mm:ss.zzz")).toLatin1().constData()) + : tqstrdup("Invalid QTime"); } template<> inline char *toString(const QDate &date) { return date.isValid() - ? qstrdup(date.toString(QLatin1String("yyyy/MM/dd")).toLatin1().constData()) - : qstrdup("Invalid QDate"); + ? tqstrdup(date.toString(QLatin1String("yyyy/MM/dd")).toLatin1().constData()) + : tqstrdup("Invalid QDate"); } template<> inline char *toString(const QDateTime &dateTime) { return dateTime.isValid() - ? qstrdup((dateTime.toString(QLatin1String("yyyy/MM/dd hh:mm:ss.zzz")) + + ? tqstrdup((dateTime.toString(QLatin1String("yyyy/MM/dd hh:mm:ss.zzz")) + (dateTime.timeSpec() == Qt::LocalTime ? QLatin1String("[local time]") : QLatin1String("[UTC]"))).toLatin1().constData()) - : qstrdup("Invalid QDateTime"); + : tqstrdup("Invalid QDateTime"); } template<> inline char *toString(const QChar &c) { - return qstrdup(QString::fromLatin1("QChar: '%1' (0x%2)").arg(c).arg(QString::number(static_cast<int>(c.unicode()), 16)).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QChar: '%1' (0x%2)").arg(c).arg(QString::number(static_cast<int>(c.unicode()), 16)).toLatin1().constData()); } template<> inline char *toString(const QPoint &p) { - return qstrdup(QString::fromLatin1("QPoint(%1,%2)").arg(p.x()).arg(p.y()).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QPoint(%1,%2)").arg(p.x()).arg(p.y()).toLatin1().constData()); } template<> inline char *toString(const QSize &s) { - return qstrdup(QString::fromLatin1("QSize(%1x%2)").arg(s.width()).arg(s.height()).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QSize(%1x%2)").arg(s.width()).arg(s.height()).toLatin1().constData()); } template<> inline char *toString(const QRect &s) { - return qstrdup(QString::fromLatin1("QRect(%1,%2 %5x%6) (bottomright %3,%4)").arg(s.left()).arg(s.top()).arg(s.right()).arg(s.bottom()).arg(s.width()).arg(s.height()).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QRect(%1,%2 %5x%6) (bottomright %3,%4)").arg(s.left()).arg(s.top()).arg(s.right()).arg(s.bottom()).arg(s.width()).arg(s.height()).toLatin1().constData()); } template<> inline char *toString(const QPointF &p) { - return qstrdup(QString::fromLatin1("QPointF(%1,%2)").arg(p.x()).arg(p.y()).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QPointF(%1,%2)").arg(p.x()).arg(p.y()).toLatin1().constData()); } template<> inline char *toString(const QSizeF &s) { - return qstrdup(QString::fromLatin1("QSizeF(%1x%2)").arg(s.width()).arg(s.height()).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QSizeF(%1x%2)").arg(s.width()).arg(s.height()).toLatin1().constData()); } template<> inline char *toString(const QRectF &s) { - return qstrdup(QString::fromLatin1("QRectF(%1,%2 %5x%6) (bottomright %3,%4)").arg(s.left()).arg(s.top()).arg(s.right()).arg(s.bottom()).arg(s.width()).arg(s.height()).toLatin1().constData()); + return tqstrdup(QString::fromLatin1("QRectF(%1,%2 %5x%6) (bottomright %3,%4)").arg(s.left()).arg(s.top()).arg(s.right()).arg(s.bottom()).arg(s.width()).arg(s.height()).toLatin1().constData()); } template<> inline char *toString(const QUrl &uri) { - return qstrdup(uri.toEncoded().constData()); + return tqstrdup(uri.toEncoded().constData()); } template<> inline char *toString(const QVariant &v) @@ -168,7 +168,7 @@ template<> inline char *toString(const QVariant &v) } vstring.append(')'); - return qstrdup(vstring.constData()); + return tqstrdup(vstring.constData()); } #ifndef QTEST_NO_SPECIALIZATIONS |