QtTest: add toString(QUuid)

[ChangeLog][QtTest] QUuids are now printed on failure.

Change-Id: I39a7b9169aef8ab6ef5ce0790920547af23bd1b9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
This commit is contained in:
Marc Mutz 2017-04-10 18:43:51 +02:00
parent d5f62f7bc7
commit da1be671cf

View File

@ -53,6 +53,7 @@
#include <QtCore/qobject.h>
#include <QtCore/qvariant.h>
#include <QtCore/qurl.h>
#include <QtCore/quuid.h>
#include <QtCore/qpoint.h>
#include <QtCore/qsize.h>
@ -164,6 +165,11 @@ template<> inline char *toString(const QUrl &uri)
return qstrdup(uri.toEncoded().constData());
}
template <> inline char *toString(const QUuid &uuid)
{
return qstrdup(uuid.toByteArray().constData());
}
template<> inline char *toString(const QVariant &v)
{
QByteArray vstring("QVariant(");