summaryrefslogtreecommitdiffstats
path: root/tests/auto/utils/qlocationtestutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/utils/qlocationtestutils.cpp')
-rw-r--r--tests/auto/utils/qlocationtestutils.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/utils/qlocationtestutils.cpp b/tests/auto/utils/qlocationtestutils.cpp
index d6e77855..df595daa 100644
--- a/tests/auto/utils/qlocationtestutils.cpp
+++ b/tests/auto/utils/qlocationtestutils.cpp
@@ -46,8 +46,7 @@ QString QLocationTestUtils::addNmeaChecksumAndBreaks(const QString &sentence)
int result = 0;
for (int i=1; i<sentence.length()-1; i++)
result ^= sentence[i].toLatin1();
- QString sum;
- sum.sprintf("%02x", result);
+ const QString sum = QString::asprintf("%02x", result);
return sentence + sum + "\r\n";
}