Browse Source

QtLocationPlugin: Move from deprecated sprintf to asprintf

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 5 years ago
parent
commit
6418619e3a
  1. 2
      src/QtLocationPlugin/QGCMapEngine.cpp
  2. 2
      src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc

2
src/QtLocationPlugin/QGCMapEngine.cpp

@ -222,7 +222,7 @@ QGCMapEngine::cacheTile(QString type, const QString& hash, const QByteArray& ima
QString QString
QGCMapEngine::getTileHash(QString type, int x, int y, int z) QGCMapEngine::getTileHash(QString type, int x, int y, int z)
{ {
return QString().sprintf("%010d%08d%08d%03d", getQGCMapEngine()->urlFactory()->getIdFromType(type), x, y, z); return QString::asprintf("%010d%08d%08d%03d", getQGCMapEngine()->urlFactory()->getIdFromType(type), x, y, z);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

2
src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc

@ -553,7 +553,7 @@ QGCMapEngineManager::getUniqueName()
int count = 1; int count = 1;
while (true) { while (true) {
name = test; name = test;
name += QString().sprintf("%03d", count++); name += QString::asprintf("%03d", count++);
if(!findName(name)) if(!findName(name))
return name; return name;
} }

Loading…
Cancel
Save