Skip to content

Commit

Permalink
Additional deprecation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Stamile committed Apr 27, 2022
1 parent 9f0cf8d commit 494306f
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
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/EmbreeTargetManager/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
try {
Preference::Preferences(true);
qDebug() << "Testing EmbreeTargetManager";
qDebug() << endl;
qDebug() << Qt::endl;

qDebug() << "Get an instance of the target manager";
EmbreeTargetManager *manager = EmbreeTargetManager::getInstance();
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/LinearAlgebra/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) {

try {
LinearAlgebra::Matrix emptyMatrix(0, 0);
qDebug() << "UnitTest for LinearAlgebra" << endl;
qDebug() << "UnitTest for LinearAlgebra" << Qt::endl;

qDebug() << "";
TestLinearAlgebra constructorTest;
Expand Down
6 changes: 3 additions & 3 deletions isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ namespace Isis {
program = isisExecutableFileName;
}

QString command = program.expanded() + " " + parameters +
" -pid=" + toString(getpid());
QString command = program.expanded();


if(!isIsisProgram) {
QString msg = "Program [" + programName + "] does not appear to be a "
Expand All @@ -62,7 +62,7 @@ namespace Isis {

QProcess childProcess;
childProcess.setProcessChannelMode(QProcess::ForwardedChannels);
childProcess.start(command);
childProcess.start(command, QStringList() << parameters << "-pid=" << toString(getpid()));
childProcess.waitForStarted();

bool connected = false;
Expand Down
1 change: 0 additions & 1 deletion isis/src/control/objs/ControlNet/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ cout << " " << "Island Count = " << islands.size() << endl;


int main() {
qsrand(42);

Preference::Preferences(true);
cout << "UnitTest for ControlNet ...." << endl << endl;
Expand Down
2 changes: 1 addition & 1 deletion isis/src/qisis/objs/CnetEditorWidget/TableViewHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ namespace Isis {
TableColumn *& col = visibleCols[i];

if (col->getTitle().isEmpty())
col->setWidth(QFontMetrics(font()).width(
col->setWidth(QFontMetrics(font()).horizontalAdvance(
QString::number(m_visibleCount)) + 22);
}
}
Expand Down
2 changes: 1 addition & 1 deletion isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace Isis {

if (image) {
ImageList::iterator foundElement;
foundElement = qFind(m_images.begin(), m_images.end(), image);
foundElement = std::find(m_images.begin(), m_images.end(), image);
m_images.erase(foundElement);

if(m_images.empty())
Expand Down
6 changes: 3 additions & 3 deletions isis/src/qisis/objs/MosaicSceneWidget/MosaicZoomTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ namespace Isis {


double MosaicZoomTool::limitZoomBy(double factor) {
QMatrix matrix = getWidget()->getView()->matrix();
QTransform matrix = getWidget()->getView()->viewportTransform();
matrix = matrix.scale(factor, factor).inverted();

int smallerDimension = getWidget()->getView()->width();
Expand All @@ -270,15 +270,15 @@ namespace Isis {
// that corresponds to the Qt bug(?) causing us to not pan correctly on
// the zoom in.
if((point2.x() - point1.x()) < 1) {
QMatrix origMatrix = getWidget()->getView()->matrix();
QTransform origMatrix = getWidget()->getView()->viewportTransform();
factor = smallerDimension / (origMatrix.m11() * 1.0);
}

point1 = matrix.map(QPointF(0, 0));
point2 = matrix.map(QPointF(largerDimension, 0));

if((point2.x() - point1.x()) > 1E10) {
QMatrix origMatrix = getWidget()->getView()->matrix();
QTransform origMatrix = getWidget()->getView()->viewportTransform();
factor = largerDimension / (origMatrix.m11() * 1E10);
}

Expand Down
6 changes: 2 additions & 4 deletions isis/src/qisis/objs/PlotWindow/PlotWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1468,11 +1468,9 @@ namespace Isis {
qRound( ((curveIndex * percentPerCurve) +
(inverseDataIndex * percentPerDataIndex)) * 1000.0));

// It turns out that qBinaryFind(container, value) is NOT the same as
// qBinaryFind(container.begin(), container.end(), value). Use the one
// that works right.

QList<QString>::const_iterator foundPos =
qBinaryFind(xAxisPoints.begin(), xAxisPoints.end(), xValueString);
std::lower_bound(xAxisPoints.begin(), xAxisPoints.end(), xValueString);

if (foundPos == xAxisPoints.end()) {
bool inserted = false;
Expand Down
3 changes: 2 additions & 1 deletion isis/src/qisis/objs/QHistogram/QHistogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ namespace Isis {
// Initialize a printer
static QPrinter *printer = NULL;
if(printer == NULL) printer = new QPrinter;
printer->setPageSize(QPrinter::Letter);
QPageSize pageSize(QPageSize::Letter);
printer->setPageSize(pageSize);
printer->setColorMode(QPrinter::Color);

QPrintDialog printDialog(printer, (QWidget *)parent());
Expand Down
4 changes: 2 additions & 2 deletions isis/src/qisis/objs/TableMainWindow/TableMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ namespace Isis {
}
}
//Add the headers to the file
t << line << endl;
t << line << Qt::endl;

//Add each row to the file
for(int i = 0; i < p_table->rowCount(); i++) {
Expand All @@ -553,7 +553,7 @@ namespace Isis {
}
//If the line is not empty, add it to the file
if (line.split(",", Qt::SkipEmptyParts).count() != 0)
t << line << endl;
t << line << Qt::endl;
}
p_currentFile.close();
this->setWindowTitle(p_title + " : " + p_currentFile.fileName());
Expand Down
5 changes: 3 additions & 2 deletions isis/src/qisis/objs/WorkOrder/WorkOrder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ find files of those names at the top level of this repository. **/
#include <QMutexLocker>
#include <QtConcurrentRun>
#include <QTimer>
#include <QElapsedTimer>
#include <QXmlStreamWriter>

#include "ControlList.h"
Expand Down Expand Up @@ -1114,7 +1115,7 @@ namespace Isis {
m_progressBar->update();

delete m_elapsedTimer;
m_elapsedTimer = new QTime;
m_elapsedTimer = new QElapsedTimer;
m_elapsedTimer->start();

if (isSynchronous()) {
Expand Down Expand Up @@ -1185,7 +1186,7 @@ namespace Isis {
m_progressBar->update();

delete m_elapsedTimer;
m_elapsedTimer = new QTime;
m_elapsedTimer = new QElapsedTimer;
m_elapsedTimer->start();

if (isSynchronous()) {
Expand Down
5 changes: 3 additions & 2 deletions isis/src/qisis/objs/WorkOrder/WorkOrder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ find files of those names at the top level of this repository. **/
#include <QMetaType>
#include <QPointer>
#include <QUndoCommand>
#include <QElapsedTimer>



Expand Down Expand Up @@ -672,9 +673,9 @@ namespace Isis {


/**
* A QTime object holding the excecution time of the WorkOrder.
* A QElapsedTimer object holding the excecution time of the WorkOrder.
*/
QTime *m_elapsedTimer;
QElapsedTimer *m_elapsedTimer;

/**
* @brief The seconds that have elapsed since the WorkOrder started executing.
Expand Down

0 comments on commit 494306f

Please sign in to comment.