summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRichard Moore <rich@kde.org>2012-05-20 13:31:55 +0100
committerQt by Nokia <qt-info@nokia.com>2012-05-21 03:10:43 +0200
commit0b8021f5cb64d751c694b976d09b0f89017b14e4 (patch)
treed276c6e2207c0d78603bf5e4d6b00c9c0d17a6e5 /tests
parent1f109a864b66ec5e4a540f78b75ff9bdad8b249b (diff)
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 <girish.1.ramakrishnan@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp4
1 files changed, 2 insertions, 2 deletions
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<QByteArray> subjectInfoAttributes;
QByteArray toDer;
QByteArray toPem;
- QByteArray toText;
+ QString toText;
QByteArray version;
};