Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 5.15.8 Update #4923

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion isis/src/base/apps/appjit/PixelOffset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace Isis {


for(size_t iline = 0; iline < lines.size(); iline++) {
fields = lines[iline].simplified().split(" ", QString::SkipEmptyParts);
fields = lines[iline].simplified().split(" ", Qt::SkipEmptyParts);
if(fields.count() != 3) {
QString msg = "Three fields are required: sample, line, and ephemeris time.";
throw IException(IException::Io, msg, _FILEINFO_);
Expand Down
10 changes: 5 additions & 5 deletions isis/src/base/apps/barscale/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ void IsisMain() {
int lblStrWidth;
if (leftLimit > 0) {
lblStr.setNum(leftLimit);
lblStrWidth = metric.width(lblStr);
lblStrWidth = metric.horizontalAdvance(lblStr);
totalWidth = totalWidth + lblStrWidth / 2;
cornerSample = cornerSample + lblStrWidth / 2;
leftDisplayRect.setRect( ( cornerSample - lblStrWidth / 2), (textCtrLine - fontHeight / 2 - 2),
(lblStrWidth + 10), (fontHeight + 8) );
}
lblStrWidth = metric.width("0");
lblStrWidth = metric.horizontalAdvance("0");
ctrDisplayRect.setRect( (cornerSample + leftLimit * scaleUnit / resolution + .5 - lblStrWidth / 2),
(textCtrLine - fontHeight / 2 - 2), (lblStrWidth + 10), (fontHeight + 8) );

Expand All @@ -250,7 +250,7 @@ void IsisMain() {
}
}
lblStr = lblStr + " " + unitStr;
lblStrWidth = metric.width(lblStr);
lblStrWidth = metric.horizontalAdvance(lblStr);
totalWidth = totalWidth + lblStrWidth + (textHt + 1) / 2 + 10;
rightDisplayRect.setRect( (barWidth + cornerSample - lblStrWidth / 2),
(textCtrLine - fontHeight / 2 - 2),
Expand Down Expand Up @@ -431,11 +431,11 @@ void IsisMain() {
painter.setLayoutDirection(Qt::LeftToRight);
if (leftLimit > 0) {
lblStr.setNum(leftLimit);
lblStrWidth = metric.width(lblStr);
lblStrWidth = metric.horizontalAdvance(lblStr);
painter.drawText(leftDisplayRect, lblStr);
}
lblStr.setNum(0);
lblStrWidth = metric.width(lblStr);
lblStrWidth = metric.horizontalAdvance(lblStr);
painter.drawText(ctrDisplayRect, lblStr);
lblStr.setNum(rightLimit);
lblStr = lblStr + " " + unitStr;
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/isisimport/isisimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
6 changes: 3 additions & 3 deletions isis/src/base/apps/isisminer/NumericalSortStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ namespace Isis {
int NumericalSortStrategy::apply(ResourceList &resources,
const ResourceList &globals) {
if ( "ascending" == m_order) {
qSort(resources.begin(), resources.end(), SortAscending(m_sortKey));
sort(resources.begin(), resources.end(), SortAscending(m_sortKey));
}
else { // ("descending" == m_order)
qSort(resources.begin(), resources.end(), SortDescending(m_sortKey));
else { // ("descending" == m_order)
sort(resources.begin(), resources.end(), SortDescending(m_sortKey));
}

// Keeps the Resource by just running the counter
Expand Down
12 changes: 7 additions & 5 deletions isis/src/base/apps/isisminer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <QString>
#include <QStringList>
#include <QTime>
#include <QElapsedTimer>

// boost library
#include <boost/foreach.hpp>
Expand Down Expand Up @@ -65,18 +66,18 @@ void IsisMain() {
globals->add("PARAMETERS", parameters);

// Split by separate parameters
QStringList parmlist = parameters.split("@", QString::SkipEmptyParts);
QStringList parmlist = parameters.split("@", Qt::SkipEmptyParts);
BOOST_FOREACH (QString parm, parmlist) {
// Split values from keyword name
QStringList keyval = parm.split(":", QString::SkipEmptyParts);
QStringList keyval = parm.split(":", Qt::SkipEmptyParts);
if ( keyval.size() != 2 ) {
QString mess = "Ill-formed PARAMETERS (" + parm + ") - use form @key:val";
throw IException(IException::User, mess, _FILEINFO_);
}

// Now split multi string values and construct the Pvl keyword
QString keyname = keyval[0];
QStringList values = keyval[1].split(",", QString::SkipEmptyParts);
QStringList values = keyval[1].split(",", Qt::SkipEmptyParts);
PvlKeyword keyword(keyname);
BOOST_FOREACH ( QString val, values) {
keyword.addValue(val);
Expand Down Expand Up @@ -113,13 +114,14 @@ void IsisMain() {
<< " (TimeIn: " << stime.toString("hh:mm:ss.zzz")
<< ")\n"
<< "Description: " << strategy->description() << "\n";
stime.start();
QElapsedTimer stimer;
stimer.start();
int n = strategy->apply(resources);
unsigned int ntotal = strategy->totalProcessed();
cout << n << " of " << ntotal << " processed in "
<< strategy->type() << "::" << strategy->name()
<< " (TimeOut: " << QTime::currentTime().toString("hh:mm:ss.zzz") << ")\n";
cout << "ElapsedTime(s): " << stime.elapsed() / 1000 << "\n";
cout << "ElapsedTime(s): " << stimer.elapsed() / 1000 << "\n";
}

// Get total elapded time
Expand Down
1 change: 1 addition & 0 deletions isis/src/base/apps/mosrange/mosrange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ find files of those names at the top level of this repository. **/

#include <QPair>
#include <QList>
#include <QFile>

#include "Camera.h"
#include "Cube.h"
Expand Down
4 changes: 1 addition & 3 deletions isis/src/base/apps/spiceinit/SpiceClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,7 @@ namespace Isis {
QString encodedString = elementContents(pointingTag);

QByteArray encodedArray;
for (int i = 0; i < encodedString.size(); i++) {
encodedArray.append(encodedString.data()[i]);
}
encodedArray.append(encodedString.toUtf8());

QByteArray unencodedArray(QByteArray::fromHex(encodedArray));

Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/apps/spiceinit/spiceinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ namespace Isis {
vector<QString> userEnteredCks;
ui.GetAsString("CK", userEnteredCks);
// convert user entered std vector to QStringList and add to ckKernelList
ckKernelList = QVector<QString>::fromStdVector(userEnteredCks).toList();
ckKernelList = QVector<QString>(userEnteredCks.begin(),userEnteredCks.end()).toList();
}
else {// loop through cks found in the system

Expand Down Expand Up @@ -283,7 +283,7 @@ namespace Isis {
// NOTE: This is using GetAsString so that vars like $mgs can be used.
vector<QString> kernels;
ui.GetAsString(param, kernels);
kernel.setKernels(QVector<QString>::fromStdVector(kernels).toList());
kernel.setKernels(QVector<QString>(kernels.begin(),kernels.end()).toList());
}
}

Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/trackextract/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void createMosaicCube(QString inputName, QString outputName, QVector<QString> ba
ProcessByLine p;

CubeAttributeInput inAtt = CubeAttributeInput();
inAtt.setBands(bandsVector.toStdVector());
inAtt.setBands(std::vector<QString>(bandsVector.begin(), bandsVector.end()));

p.SetInputCube(inputName, inAtt);
p.SetOutputCube("TO");
Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/objs/Application/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find files of those names at the top level of this repository. **/
#include <iostream>
#include <fstream>
#include <QString>
#include <QTime>
#include <QElapsedTimer>
#include <string>
#include <ctime>

Expand Down Expand Up @@ -148,7 +148,7 @@ namespace Isis {
QLocalSocket *p_connectionToParent; //!<
time_t p_startTime; //!<
clock_t p_startClock; //!<
QTime m_connectTime; //!< Used to calculate program's run time
QElapsedTimer m_connectTime; //!< Used to calculate program's run time
QString p_datetime; //!<
int p_startDirectIO; //!<
int p_startPageFaults; //!<
Expand Down
6 changes: 4 additions & 2 deletions isis/src/base/objs/BulletShapeModel/BulletShapeModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ namespace Isis {
*/
void BulletShapeModel::calculateSurfaceNormal() {
// ShapeModel (parent class) throws error if no intersection
setNormal(ellipsoidNormal().toStdVector());// this takes care of setHasNormal(true);
QVector<double> norm = ellipsoidNormal();
setNormal(std::vector<double>(norm.begin(), norm.end()));// this takes care of setHasNormal(true);
}


Expand Down Expand Up @@ -581,7 +582,8 @@ namespace Isis {
// Get the body radii and compute the true normal of the ellipsoid
QVector<double> norm(3);
// need a case for target == NULL
QVector<Distance> radii = QVector<Distance>::fromStdVector(targetRadii());
std::vector<Distance> stdRadii = targetRadii();
QVector<Distance> radii = QVector<Distance>(stdRadii.begin(), stdRadii.end());
NaifStatus::CheckErrors();
surfnm_c(radii[0].kilometers(), radii[1].kilometers(), radii[2].kilometers(),
pB, &norm[0]);
Expand Down
12 changes: 6 additions & 6 deletions isis/src/base/objs/BulletTargetShape/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ using namespace Isis;
int main(int argc, char *argv[]) {
try {
qDebug() << "Testing BulletTargetShape";
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing default constructor";
qDebug() << "";
BulletTargetShape defaultTargetShape;
qDebug() << "Target name: " << defaultTargetShape.name();
qDebug() << "Maximum distance in kilometers: " << defaultTargetShape.maximumDistance();
qDebug() << "btCollisionBody pointer is valid? " << (bool) defaultTargetShape.body();
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing load constructor";
QString dskfile("$ISISTESTDATA/isis/src/base/unitTestData/hay_a_amica_5_itokawashape_v1_0_64q.bds");
Expand All @@ -37,30 +37,30 @@ int main(int argc, char *argv[]) {
qDebug() << "Target name: " << itokawaTargetShape->name();
qDebug() << "Maximum distance in kilometers: " << itokawaTargetShape->maximumDistance();
qDebug() << "btCollisionBody pointer is valid? " << (bool) itokawaTargetShape->body();
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing load constructor with cube";
QString itokawaCube = "$ISISTESTDATA/isis/src/hayabusa/unitTestData/st_2391934788_v.cub";
qDebug() << "Testing with " << itokawaCube << "...";
qDebug() << "";
BulletTargetShape *cubeTargetShape = BulletTargetShape::load(itokawaCube);
qDebug() << "Target shape pointer is valid?" << (bool) cubeTargetShape;
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing load constructor with other extension";
QString otherFile = "$ISISTESTDATA/isis/src/base/unitTestData/xmlTestLabel.xml";
qDebug() << "Testing with " << otherFile << "...";
qDebug() << "";
BulletTargetShape *otherTargetShape = BulletTargetShape::load(otherFile);
qDebug() << "Target shape pointer is valid?" << (bool) otherTargetShape;
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing collision body constructor";
BulletTargetShape collisionTargetShape(itokawaTargetShape->body(), "Itokawa");
qDebug() << "Target name: " << collisionTargetShape.name();
qDebug() << "Maximum distance in kilometers: " << collisionTargetShape.maximumDistance();
qDebug() << "btCollisionBody pointer is valid? " << (bool) collisionTargetShape.body();
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing null collision body constructor";
BulletTargetShape nullTargetShape(0, "Null");
Expand Down
6 changes: 3 additions & 3 deletions isis/src/base/objs/BulletWorldManager/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ using namespace Isis;
int main(int argc, char *argv[]) {
try {
qDebug() << "Testing BulletWorldManager";
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing default constructor";
qDebug() << "";
BulletWorldManager defaultWorld;
qDebug() << "World name: " << defaultWorld.name();
qDebug() << "World size: " << defaultWorld.size();
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Testing with a name";
BulletWorldManager namedWorld("TestWorld");
qDebug() << "World name: " << namedWorld.name();
qDebug() << "World size: " << namedWorld.size();
qDebug() << endl;
qDebug() << Qt::endl;


QString dskfile("$ISISTESTDATA/isis/src/base/unitTestData/hay_a_amica_5_itokawashape_v1_0_64q.bds");
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/CSVReader/CSVReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ namespace Isis {
int parse(const QString &str, const char &delimiter = ',',
bool keepEmptyParts = true) {
QStringList tokens =
str.split(delimiter, keepEmptyParts? QString::KeepEmptyParts : QString::SkipEmptyParts);
str.split(delimiter, keepEmptyParts? Qt::KeepEmptyParts : Qt::SkipEmptyParts);
TokenList slist(tokens.size());
for(int i = 0 ; i < tokens.size() ; i++) {
slist[i] = TokenType(tokens[i]);
Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/objs/Cube/CubeIoHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find files of those names at the top level of this repository. **/
#include <QMutex>
#include <QPair>
#include <QRect>
#include <QTime>
#include <QElapsedTimer>

#include "Area3D.h"
#include "Brick.h"
Expand Down Expand Up @@ -1866,7 +1866,7 @@ namespace Isis {
CubeIoHandler * ioHandler, QList<Buffer *> buffersToWrite) {
m_ioHandler = ioHandler;
m_buffersToWrite = new QList<Buffer *>(buffersToWrite);
m_timer = new QTime;
m_timer = new QElapsedTimer;
m_timer->start();

m_ioHandler->m_writeThreadMutex->lock();
Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/objs/Cube/CubeIoHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ find files of those names at the top level of this repository. **/

class QFile;
class QMutex;
class QTime;
class QElapsedTimer;
template <typename A> class QList;
template <typename A, typename B> class QMap;
template <typename A, typename B> struct QPair;
Expand Down Expand Up @@ -209,7 +209,7 @@ namespace Isis {
//! The buffers that need pushed into the IO handler; we own these
QList<Buffer * > * m_buffersToWrite;
//! Used to calculate the lifetime of an instance of this class
QTime *m_timer;
QElapsedTimer *m_timer;
};


Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/CubeAttribute/CubeAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace Isis {

QString str = toString().remove(QRegExp("^\\+"));

QStringList strSplit = str.split(",", QString::SkipEmptyParts);
QStringList strSplit = str.split(",", Qt::SkipEmptyParts);
foreach (QString commaTok, strSplit) {
// Is this token a range of bands
if (commaTok.contains('-')) {
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/CubeAttribute/CubeAttribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ namespace Isis {
* FileName("out.cub+Bsq")
*/
void setAttributes(const FileName &fileName) {
QStringList attributes = fileName.attributes().split("+", QString::SkipEmptyParts);
QStringList attributes = fileName.attributes().split("+", Qt::SkipEmptyParts);

m_attributes.clear();
foreach (QString attribute, attributes)
Expand Down
6 changes: 4 additions & 2 deletions isis/src/base/objs/EmbreeShapeModel/EmbreeShapeModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ namespace Isis {
*/
void EmbreeShapeModel::calculateSurfaceNormal() {
// ShapeModel (parent class) throws error if no intersection
setNormal(ellipsoidNormal().toStdVector());// this takes care of setHasNormal(true);
QVector<double> norm = ellipsoidNormal();
setNormal(std::vector<double>(norm.begin(), norm.end()));// this takes care of setHasNormal(true);
return;
}

Expand Down Expand Up @@ -567,7 +568,8 @@ namespace Isis {
// Get the body radii and compute the true normal of the ellipsoid
QVector<double> norm(3);
// need a case for target == NULL
QVector<Distance> radii = QVector<Distance>::fromStdVector(targetRadii());
std::vector<Distance> stdRadii = targetRadii();
QVector<Distance> radii = QVector<Distance>(stdRadii.begin(), stdRadii.end());
NaifStatus::CheckErrors();
surfnm_c(radii[0].kilometers(), radii[1].kilometers(), radii[2].kilometers(),
pB, &norm[0]);
Expand Down
Loading