summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qalgorithms
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-01-23 12:03:36 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-02-12 19:40:04 +0000
commit05c38a9111320da311e5993faf12ce8e1f1713e8 (patch)
treeb1ca051511120d113e891333b8918f8d5a4748ef /tests/auto/corelib/tools/qalgorithms
parentabcb5471b75fe9879775ec16f0f12a1e30422789 (diff)
QtCore: assorted migrations to QString::asprintf
Change-Id: Ie99d3eeeced89dd8336717954fd5ca7117bb20b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools/qalgorithms')
-rw-r--r--tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
index 0a06129ab1..9bce948140 100644
--- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
+++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -1054,22 +1054,22 @@ void tst_QAlgorithms::popCount_data_impl(size_t sizeof_T_Int)
const uint bits = bitsSetInByte(byte);
const quint64 value = static_cast<quint64>(byte);
const quint64 input = value << ((i % sizeof_T_Int) * 8U);
- newRow(qPrintable(QString().sprintf("0x%016llx", input))) << input << bits;
+ newRow(qPrintable(QString::asprintf("0x%016llx", input))) << input << bits;
}
// and some random ones:
if (sizeof_T_Int >= 8)
for (size_t i = 0; i < 1000; ++i) {
const quint64 input = quint64(qrand()) << 32 | quint32(qrand());
- newRow(qPrintable(QString().sprintf("0x%016llx", input))) << input << bitsSetInInt64(input);
+ newRow(qPrintable(QString::asprintf("0x%016llx", input))) << input << bitsSetInInt64(input);
}
else if (sizeof_T_Int >= 2)
for (size_t i = 0; i < 1000 ; ++i) {
const quint32 input = qrand();
if (sizeof_T_Int >= 4)
- newRow(qPrintable(QString().sprintf("0x%08x", input))) << quint64(input) << bitsSetInInt(input);
+ newRow(qPrintable(QString::asprintf("0x%08x", input))) << quint64(input) << bitsSetInInt(input);
else
- newRow(qPrintable(QString().sprintf("0x%04x", quint16(input & 0xFFFF)))) << quint64(input & 0xFFFF) << bitsSetInShort(input & 0xFFFF);
+ newRow(qPrintable(QString::asprintf("0x%04x", quint16(input & 0xFFFF)))) << quint64(input & 0xFFFF) << bitsSetInShort(input & 0xFFFF);
}
}