diff --git a/isis/src/base/objs/BulletWorldManager/unitTest.cpp b/isis/src/base/objs/BulletWorldManager/unitTest.cpp index 2c0684373f..84373d30e1 100644 --- a/isis/src/base/objs/BulletWorldManager/unitTest.cpp +++ b/isis/src/base/objs/BulletWorldManager/unitTest.cpp @@ -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"); diff --git a/isis/src/base/objs/EmbreeTargetManager/unitTest.cpp b/isis/src/base/objs/EmbreeTargetManager/unitTest.cpp index 32f3e6f576..a770f020fa 100644 --- a/isis/src/base/objs/EmbreeTargetManager/unitTest.cpp +++ b/isis/src/base/objs/EmbreeTargetManager/unitTest.cpp @@ -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(); diff --git a/isis/src/base/objs/LinearAlgebra/unitTest.cpp b/isis/src/base/objs/LinearAlgebra/unitTest.cpp index 844ca57d27..be94b786ec 100644 --- a/isis/src/base/objs/LinearAlgebra/unitTest.cpp +++ b/isis/src/base/objs/LinearAlgebra/unitTest.cpp @@ -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; diff --git a/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp b/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp index 84af06cada..f85f7c885e 100644 --- a/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp +++ b/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp @@ -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 " @@ -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; diff --git a/isis/src/control/objs/ControlNet/unitTest.cpp b/isis/src/control/objs/ControlNet/unitTest.cpp index 019b1e3dba..6ed8c487b5 100644 --- a/isis/src/control/objs/ControlNet/unitTest.cpp +++ b/isis/src/control/objs/ControlNet/unitTest.cpp @@ -168,7 +168,6 @@ cout << " " << "Island Count = " << islands.size() << endl; int main() { - qsrand(42); Preference::Preferences(true); cout << "UnitTest for ControlNet ...." << endl << endl; diff --git a/isis/src/qisis/objs/CnetEditorWidget/TableViewHeader.cpp b/isis/src/qisis/objs/CnetEditorWidget/TableViewHeader.cpp index 0bae681b54..20d8961342 100644 --- a/isis/src/qisis/objs/CnetEditorWidget/TableViewHeader.cpp +++ b/isis/src/qisis/objs/CnetEditorWidget/TableViewHeader.cpp @@ -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); } } diff --git a/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp b/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp index cd492835da..c2e78dbddd 100644 --- a/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp +++ b/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp @@ -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()) diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicZoomTool.cpp b/isis/src/qisis/objs/MosaicSceneWidget/MosaicZoomTool.cpp index 65f776940a..320c04e6de 100644 --- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicZoomTool.cpp +++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicZoomTool.cpp @@ -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(); @@ -270,7 +270,7 @@ 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); } @@ -278,7 +278,7 @@ namespace Isis { 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); } diff --git a/isis/src/qisis/objs/PlotWindow/PlotWindow.cpp b/isis/src/qisis/objs/PlotWindow/PlotWindow.cpp index 1c16f4b109..7491f4541c 100644 --- a/isis/src/qisis/objs/PlotWindow/PlotWindow.cpp +++ b/isis/src/qisis/objs/PlotWindow/PlotWindow.cpp @@ -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::const_iterator foundPos = - qBinaryFind(xAxisPoints.begin(), xAxisPoints.end(), xValueString); + std::lower_bound(xAxisPoints.begin(), xAxisPoints.end(), xValueString); if (foundPos == xAxisPoints.end()) { bool inserted = false; diff --git a/isis/src/qisis/objs/QHistogram/QHistogram.cpp b/isis/src/qisis/objs/QHistogram/QHistogram.cpp index b30b801c33..858b0b34de 100644 --- a/isis/src/qisis/objs/QHistogram/QHistogram.cpp +++ b/isis/src/qisis/objs/QHistogram/QHistogram.cpp @@ -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()); diff --git a/isis/src/qisis/objs/TableMainWindow/TableMainWindow.cpp b/isis/src/qisis/objs/TableMainWindow/TableMainWindow.cpp index 0ce3429c9d..456a0b2608 100644 --- a/isis/src/qisis/objs/TableMainWindow/TableMainWindow.cpp +++ b/isis/src/qisis/objs/TableMainWindow/TableMainWindow.cpp @@ -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++) { @@ -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()); diff --git a/isis/src/qisis/objs/WorkOrder/WorkOrder.cpp b/isis/src/qisis/objs/WorkOrder/WorkOrder.cpp index 58bc203a7a..369487ee74 100644 --- a/isis/src/qisis/objs/WorkOrder/WorkOrder.cpp +++ b/isis/src/qisis/objs/WorkOrder/WorkOrder.cpp @@ -16,6 +16,7 @@ find files of those names at the top level of this repository. **/ #include #include #include +#include #include #include "ControlList.h" @@ -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()) { @@ -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()) { diff --git a/isis/src/qisis/objs/WorkOrder/WorkOrder.h b/isis/src/qisis/objs/WorkOrder/WorkOrder.h index 97d40b395e..cb587d6796 100644 --- a/isis/src/qisis/objs/WorkOrder/WorkOrder.h +++ b/isis/src/qisis/objs/WorkOrder/WorkOrder.h @@ -16,6 +16,7 @@ find files of those names at the top level of this repository. **/ #include #include #include +#include @@ -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.