From 73eb67c689f463b5006d13f4fe53bddaabf8fb11 Mon Sep 17 00:00:00 2001 From: Amy Stamile Date: Wed, 29 Nov 2023 10:54:50 -0700 Subject: [PATCH] fixed leftover warnings --- isis/src/base/apps/isisimport/isisimport.cpp | 2 +- isis/src/base/objs/LidarData/LidarData.cpp | 10 ++++------ isis/src/base/objs/LidarData/unitTest.cpp | 2 +- .../apps/findfeatures/FeatureAlgorithmFactory.cpp | 4 ++-- isis/src/lro/apps/lronaccal/lronaccal.cpp | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/isis/src/base/apps/isisimport/isisimport.cpp b/isis/src/base/apps/isisimport/isisimport.cpp index e993321b89..2c6f2bfb60 100644 --- a/isis/src/base/apps/isisimport/isisimport.cpp +++ b/isis/src/base/apps/isisimport/isisimport.cpp @@ -181,7 +181,7 @@ namespace Isis { stretchPairs->GetLine(line); //assigns value to line line = line.simplified(); - for (QString value: line.split(QRegExp("[\\s,]"), QString::SkipEmptyParts)) { + for (QString value: line.split(QRegExp("[\\s,]"), Qt::SkipEmptyParts)) { vectorStretchPairs.push_back(temp1); vectorStretchPairs.push_back(toDouble(value)); temp1++; diff --git a/isis/src/base/objs/LidarData/LidarData.cpp b/isis/src/base/objs/LidarData/LidarData.cpp index d41b786ec8..b4f58df457 100644 --- a/isis/src/base/objs/LidarData/LidarData.cpp +++ b/isis/src/base/objs/LidarData/LidarData.cpp @@ -289,11 +289,8 @@ namespace Isis { // Load file QByteArray saveData = loadFile.readAll(); - // Try to load from JSON (ASCII); if it can not, load as binary. - QJsonDocument loadDoc(QJsonDocument::fromJson(saveData)); - if (loadDoc.isNull()) { - loadDoc = QJsonDocument::fromBinaryData(saveData); - } + QCborValue loadData(saveData); + QJsonDocument loadDoc(QJsonDocument::fromJson(loadData.toByteArray())); int totalMeasures = 0; @@ -613,7 +610,8 @@ namespace Isis { saveFile.write(lidarDataDoc.toJson()); } else { - saveFile.write(lidarDataDoc.toBinaryData()); + QCborValue json(lidarDataDoc.toJson()); + saveFile.write(json.toByteArray()); } } diff --git a/isis/src/base/objs/LidarData/unitTest.cpp b/isis/src/base/objs/LidarData/unitTest.cpp index 8b4a1d976f..ba8cd8076f 100644 --- a/isis/src/base/objs/LidarData/unitTest.cpp +++ b/isis/src/base/objs/LidarData/unitTest.cpp @@ -172,7 +172,7 @@ void print(const LidarData &lidarData) { QList< QSharedPointer > points = lidarData.points(); // Order the control points so test runs will list points in a consistent order - qSort(points.begin(), points.end(), cmpLessThan); + std::sort(points.begin(), points.end(), cmpLessThan); std::cout << "LidarData:" << std::endl; foreach (QSharedPointer point, points) { diff --git a/isis/src/control/apps/findfeatures/FeatureAlgorithmFactory.cpp b/isis/src/control/apps/findfeatures/FeatureAlgorithmFactory.cpp index a172c16547..6ac09f6e6c 100644 --- a/isis/src/control/apps/findfeatures/FeatureAlgorithmFactory.cpp +++ b/isis/src/control/apps/findfeatures/FeatureAlgorithmFactory.cpp @@ -217,11 +217,11 @@ const PvlFlatMap &FeatureAlgorithmFactory::globalParameters() const { */ PvlFlatMap FeatureAlgorithmFactory::parseGlobalParameters(const QString &globals) { PvlFlatMap pvlmap; - QStringList parms = globals.split("@", QString::SkipEmptyParts); + QStringList parms = globals.split("@", Qt::SkipEmptyParts); for (int i = 0 ; i < parms.size() ; i++ ) { // Only parse substrings that have 2 distinct parts separated by : - QStringList parts = parms[i].split(":", QString::SkipEmptyParts); + QStringList parts = parms[i].split(":", Qt::SkipEmptyParts); if ( parts.size() == 2 ) { pvlmap.add(parts[0], parts[1]); } diff --git a/isis/src/lro/apps/lronaccal/lronaccal.cpp b/isis/src/lro/apps/lronaccal/lronaccal.cpp index a6d485c1b6..6f9bf917eb 100644 --- a/isis/src/lro/apps/lronaccal/lronaccal.cpp +++ b/isis/src/lro/apps/lronaccal/lronaccal.cpp @@ -521,7 +521,7 @@ namespace Isis { vector line; lineString = lineString.simplified().remove(QRegExp("^[ ,]*")).trimmed(); - QStringList lineTokens = lineString.split(QRegExp("[ ,]"), QString::SkipEmptyParts); + QStringList lineTokens = lineString.split(QRegExp("[ ,]"), Qt::SkipEmptyParts); foreach (QString value, lineTokens) { line.push_back(toDouble(value)); }