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:
parent
d5f62f7bc7
commit
da1be671cf
@ -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(");
|
||||
|
Loading…
Reference in New Issue
Block a user