From 0b8021f5cb64d751c694b976d09b0f89017b14e4 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Sun, 20 May 2012 13:31:55 +0100 Subject: Change QSslCertificate::toText() to return a QString. A couple of people reviewing the toText() method (which is new in 5.0) have said that since the string returned is human readable it should be a QString not a QByteArray. This change follows their advice. Change-Id: Ibade9a24870805f7fbe2d299abeb9c6e964f0cf4 Reviewed-by: Girish Ramakrishnan Reviewed-by: Lars Knoll --- tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 2383d822c3..7e7c2daee5 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -859,7 +859,7 @@ void tst_QSslCertificate::toText() QFile fNew(testDataDir + "/more-certificates/cert-large-expiration-date.txt.1.0.0"); QVERIFY(fNew.open(QIODevice::ReadOnly | QFile::Text)); QByteArray txtNew = fNew.readAll(); - QVERIFY(txtOld == cert.toText() || txtNew == cert.toText()); + QVERIFY(QString::fromLatin1(txtOld) == cert.toText() || QString::fromLatin1(txtNew) == cert.toText()); } void tst_QSslCertificate::multipleCommonNames() @@ -1093,7 +1093,7 @@ public: QList subjectInfoAttributes; QByteArray toDer; QByteArray toPem; - QByteArray toText; + QString toText; QByteArray version; }; -- cgit v1.2.3