diff --git a/DRAMSys/traceAnalyzer/evaluationtool.cpp b/DRAMSys/traceAnalyzer/evaluationtool.cpp index 8820eb1f..155b006d 100644 --- a/DRAMSys/traceAnalyzer/evaluationtool.cpp +++ b/DRAMSys/traceAnalyzer/evaluationtool.cpp @@ -125,7 +125,7 @@ void EvaluationTool::cleanUpUI() void EvaluationTool::fillFileList(QList paths) { - qSort(paths.begin(), paths.end(), [] (const QString & path1, + std::sort(paths.begin(), paths.end(), [] (const QString & path1, const QString & path2) { return QFileInfo(path1).baseName() < QFileInfo(path2).baseName(); }); diff --git a/DRAMSys/traceAnalyzer/presentation/tracedrawing.cpp b/DRAMSys/traceAnalyzer/presentation/tracedrawing.cpp index 023cfd61..6a1b15af 100644 --- a/DRAMSys/traceAnalyzer/presentation/tracedrawing.cpp +++ b/DRAMSys/traceAnalyzer/presentation/tracedrawing.cpp @@ -139,7 +139,7 @@ void drawText(QPainter *painter, const QString &text, const QPoint &position, QPen saved = painter->pen(); painter->setPen(QPen(textColor)); QFontMetrics fm = painter->fontMetrics(); - QPoint offset(fm.width(text), fm.height()); + QPoint offset(fm.horizontalAdvance(text), fm.height()); QRect rect(position - offset, position + offset); int flags; diff --git a/DRAMSys/traceAnalyzer/presentation/traceplot.cpp b/DRAMSys/traceAnalyzer/presentation/traceplot.cpp index fef381a1..cc5a5f12 100644 --- a/DRAMSys/traceAnalyzer/presentation/traceplot.cpp +++ b/DRAMSys/traceAnalyzer/presentation/traceplot.cpp @@ -624,9 +624,9 @@ bool TracePlot::eventFilter(QObject *object, QEvent *event) case QEvent::Wheel : { QWheelEvent *wheelEvent = static_cast(event); traceTime zoomCenter = static_cast(this->invTransform(xBottom, - wheelEvent->x())); + wheelEvent->position().x())); - (wheelEvent->delta() > 0) ? zoomIn(zoomCenter) : zoomOut(zoomCenter); + (wheelEvent->angleDelta().y() > 0) ? zoomIn(zoomCenter) : zoomOut(zoomCenter); return true; } diff --git a/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp b/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp index ae9906a1..34f27b83 100644 --- a/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp +++ b/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp @@ -211,7 +211,7 @@ bool TraceScroller::eventFilter( QObject *object, QEvent *event ) QWheelEvent *wheelEvent = static_cast(event); traceTime offset; int speed = 4; - (wheelEvent->delta() > 0) ? offset = -zoomLevel * speed : offset = zoomLevel * + (wheelEvent->angleDelta().y() > 0) ? offset = -zoomLevel * speed : offset = zoomLevel * speed; navigator->navigateToTime(navigator->CurrentTraceTime() + offset); return true; diff --git a/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp b/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp index e3d4a773..a730d266 100644 --- a/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp +++ b/DRAMSys/traceAnalyzer/presentation/tracetesttreewidget.cpp @@ -51,9 +51,9 @@ void TraceTestTreeWidget::addTraceTestResult(const TraceTestResults addTopLevelItem(top); if (traceTestResult.hasPassedAllTests()) - top->setTextColor(0, Qt::green); + top->setForeground(0, Qt::green); else - top->setTextColor(0, Qt::red); + top->setForeground(0, Qt::red); for (const TestResult &testResult : traceTestResult.getTestResults()) { new TestResultTreeItem(top, testResult); @@ -79,6 +79,6 @@ TraceTestTreeWidget::TestResultTreeItem::TestResultTreeItem( { setText(0, testResult.getTestName()); if (!testResult.hasPassed()) - setTextColor(0, Qt::red); + setForeground(0, Qt::red); message = testResult.getMessage(); } diff --git a/DRAMSys/traceAnalyzer/traceanalyzer.cpp b/DRAMSys/traceAnalyzer/traceanalyzer.cpp index 02103ce7..e8893361 100644 --- a/DRAMSys/traceAnalyzer/traceanalyzer.cpp +++ b/DRAMSys/traceAnalyzer/traceanalyzer.cpp @@ -175,8 +175,8 @@ void TraceAnalyzer::on_actionReload_all_triggered() tabIndex++; } - QList list = openedTraceFiles.toList(); - qSort(list); + QList list = openedTraceFiles.values(); + std::sort(list.begin(), list.end()); // Recreate all tabs tabIndex = 0; @@ -222,12 +222,12 @@ void TraceAnalyzer::on_actionTest_triggered() { evaluationTool.raise(); evaluationTool.activateWindow(); - evaluationTool.showAndRunTests(openedTraceFiles.toList()); + evaluationTool.showAndRunTests(openedTraceFiles.values()); } void TraceAnalyzer::on_actionMetrics_triggered() { evaluationTool.raise(); evaluationTool.activateWindow(); - evaluationTool.showAndEvaluateMetrics(openedTraceFiles.toList()); + evaluationTool.showAndEvaluateMetrics(openedTraceFiles.values()); }