Unverified Commit 48fc09ea authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8758 from patrickelectric/fix_more_and_more_deprecated

Fix more and more deprecated issues
parents 64712c25 9552d964
......@@ -164,7 +164,7 @@ QGCCameraControl::QGCCameraControl(const mavlink_camera_information_t *info, Veh
_vendor = QString(reinterpret_cast<const char*>(info->vendor_name));
_modelName = QString(reinterpret_cast<const char*>(info->model_name));
int ver = static_cast<int>(_info.cam_definition_version);
_cacheFile.sprintf("%s/%s_%s_%03d.xml",
_cacheFile = QString::asprintf("%s/%s_%s_%03d.xml",
qgcApp()->toolbox()->settingsManager()->appSettings()->parameterSavePath().toStdString().c_str(),
_vendor.toStdString().c_str(),
_modelName.toStdString().c_str(),
......@@ -228,9 +228,7 @@ QGCCameraControl::firmwareVersion()
int major = (_info.firmware_version >> 24) & 0xFF;
int minor = (_info.firmware_version >> 16) & 0xFF;
int build = _info.firmware_version & 0xFFFF;
QString ver;
ver.sprintf("%d.%d.%d", major, minor, build);
return ver;
return QString::asprintf("%d.%d.%d", major, minor, build);
}
//-----------------------------------------------------------------------------
......
......@@ -403,7 +403,7 @@ void PlanMasterController::loadFromFile(const QString& filename)
}
if(success){
_currentPlanFile.sprintf("%s/%s.%s", fileInfo.path().toLocal8Bit().data(), fileInfo.completeBaseName().toLocal8Bit().data(), AppSettings::planFileExtension);
_currentPlanFile = QString::asprintf("%s/%s.%s", fileInfo.path().toLocal8Bit().data(), fileInfo.completeBaseName().toLocal8Bit().data(), AppSettings::planFileExtension);
} else {
_currentPlanFile.clear();
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment