Browse Source

QGCTileCacheWorker: Fix deprecated QString::sprintf

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 5 years ago
parent
commit
9552d964fe
  1. 3
      src/QtLocationPlugin/QGCTileCacheWorker.cpp

3
src/QtLocationPlugin/QGCTileCacheWorker.cpp

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

Loading…
Cancel
Save