From dcf9883dffc88355402e5697f0572e5241e1c062 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 4 Aug 2014 23:57:51 -0300 Subject: Move the special QByteArrayList methods into QList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and make QByteArrayList be a simple typedef. As a side-effect, the constructor taking a QByteArray is no longer available since I couldn't find a way to add it to QList when T is QByteArray. My template-foo failed me. I tried: - QEnableIf::value, QByteArray>::type => makes QList fail to compile for any T that isn't QByteArray - make the constructor a template member => it compiles if the parameter is a QByteArray, but not a const char[4] like the test was - inheriting constructors => runs into ICC and Clang bugs that I could not work around Besides, the constructor with std::initializer_list is a superior solution anyway. Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89 Reviewed-by: Marc Mutz Reviewed-by: Jędrzej Nowacki --- tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/tools/qbytearraylist') diff --git a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp b/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp index 7d409ca1b8..c17f75f561 100644 --- a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp +++ b/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp @@ -81,7 +81,7 @@ void tst_QByteArrayList::join_data() const QTest::newRow("data1") << QByteArrayList() << QByteArray(); - QTest::newRow("data2") << QByteArrayList("one") + QTest::newRow("data2") << (QByteArrayList() << "one") << QByteArray("one"); QTest::newRow("data3") << (QByteArrayList() << "a" << "b") @@ -114,7 +114,7 @@ void tst_QByteArrayList::joinByteArray_data() const << QByteArray("separator") << QByteArray(); - QTest::newRow("data3") << QByteArrayList("one") + QTest::newRow("data3") << (QByteArrayList() << "one") << QByteArray("separator") << QByteArray("one"); -- cgit v1.2.3