diff --git a/src/QtLocationPlugin/QGCTileCacheWorker.cpp b/src/QtLocationPlugin/QGCTileCacheWorker.cpp index f18626ac7cedb12d2f4a8d7432d61d5bf14d8c0d..37db5755dbd20e4cb2ca578ce9c5a19f6530106b 100644 --- a/src/QtLocationPlugin/QGCTileCacheWorker.cpp +++ b/src/QtLocationPlugin/QGCTileCacheWorker.cpp @@ -736,8 +736,7 @@ QGCCacheWorker::_importSets(QGCMapTask* mtask) int testCount = 0; //-- Set with this name already exists. Make name unique. while (true) { - QString testName; - testName.sprintf("%s %02d", name.toLatin1().data(), ++testCount); + auto testName = QString::asprintf("%s %02d", name.toLatin1().data(), ++testCount); if(!_findTileSetID(testName, insertSetID) || testCount > 99) { name = testName; break;