diff --git a/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp b/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp index 79416faaf98..8b4cfeb4faf 100644 --- a/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp +++ b/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp @@ -10,6 +10,9 @@ #include #include +#include +#include + #include static const int minResolution = 400; // the minimum resolution for the tests @@ -23,9 +26,10 @@ template<> char *toString(const QDeadlineTimer &dt) qint64 deadline = dt.deadlineNSecs(); char *buf = new char[256]; - qsnprintf(buf, 256, "%lld.%09d%s", - deadline / 1000 / 1000 / 1000, qAbs(deadline) % (1000 * 1000 * 1000), - dt.hasExpired() ? " (expired)" : ""); + std::snprintf(buf, 256, "%lld.%09lld%s", + deadline / 1000 / 1000 / 1000, + std::abs(deadline) % (1000 * 1000 * 1000), + dt.hasExpired() ? " (expired)" : ""); return buf; } }