From 5b810da73b579b2f1c4f3f094024d6f9f29d2a0e Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 2 Jun 2024 15:04:36 -0700 Subject: [PATCH] Fixed compilation warnings on 22.04 (Qt 5.15.3) --- guilib/src/DatabaseViewer.cpp | 4 ++-- guilib/src/MainWindow.cpp | 2 +- guilib/src/ui/mainWindow.ui | 3 --- guilib/src/ui/preferencesDialog.ui | 2 +- guilib/src/utilite/UPlot.cpp | 8 ++++---- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/guilib/src/DatabaseViewer.cpp b/guilib/src/DatabaseViewer.cpp index 64c0f10a65..e09f3add13 100644 --- a/guilib/src/DatabaseViewer.cpp +++ b/guilib/src/DatabaseViewer.cpp @@ -1729,7 +1729,7 @@ void DatabaseViewer::updateIds() UINFO("Loading all IDs..."); std::set ids; dbDriver_->getAllNodeIds(ids); -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) ids_ = QList(ids.begin(), ids.end()); #else ids_ = QList::fromStdList(std::list(ids.begin(), ids.end())); @@ -3960,7 +3960,7 @@ void DatabaseViewer::regenerateCurrentLocalMaps() QSet idsSet; idsSet.insert(ids_.at(ui_->horizontalSlider_A->value())); idsSet.insert(ids_.at(ui_->horizontalSlider_B->value())); -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) QList ids(idsSet.begin(), idsSet.end()); #else QList ids = idsSet.toList(); diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index e2c95f1f6a..ee463dc7bb 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -5078,7 +5078,7 @@ void MainWindow::drawKeypoints(const std::multimap & refWords _lastId = (*refWords.rbegin()).first; } std::list kpts = uKeysList(refWords); -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) _lastIds = QSet(kpts.begin(), kpts.end()); #else _lastIds = QSet::fromList(QList::fromStdList(kpts)); diff --git a/guilib/src/ui/mainWindow.ui b/guilib/src/ui/mainWindow.ui index ceb86a163d..1ddb80530c 100644 --- a/guilib/src/ui/mainWindow.ui +++ b/guilib/src/ui/mainWindow.ui @@ -427,9 +427,6 @@ - - QDockWidget::AllDockWidgetFeatures - A posteriori PDF diff --git a/guilib/src/ui/preferencesDialog.ui b/guilib/src/ui/preferencesDialog.ui index c4556e2814..d39b18bc54 100644 --- a/guilib/src/ui/preferencesDialog.ui +++ b/guilib/src/ui/preferencesDialog.ui @@ -10828,7 +10828,7 @@ generate the number of words requested. - + If true, SSC (Suppression via Square Covering) is applied to limit keypoints. diff --git a/guilib/src/utilite/UPlot.cpp b/guilib/src/utilite/UPlot.cpp index 3377dbf3e3..4d632a09ec 100644 --- a/guilib/src/utilite/UPlot.cpp +++ b/guilib/src/utilite/UPlot.cpp @@ -789,7 +789,7 @@ void UPlotCurve::draw(QPainter * painter, const QRect & limits) { QPointF intersection; QLineF::IntersectType type; -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) type = lineItem->line().intersects(QLineF(limits.topLeft(), limits.bottomLeft()), &intersection); #else type = lineItem->line().intersect(QLineF(limits.topLeft(), limits.bottomLeft()), &intersection); @@ -800,7 +800,7 @@ void UPlotCurve::draw(QPainter * painter, const QRect & limits) } else { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) type = lineItem->line().intersects(QLineF(limits.topLeft(), limits.topRight()), &intersection); #else type = lineItem->line().intersect(QLineF(limits.topLeft(), limits.topRight()), &intersection); @@ -811,7 +811,7 @@ void UPlotCurve::draw(QPainter * painter, const QRect & limits) } else { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) type = lineItem->line().intersects(QLineF(limits.bottomLeft(), limits.bottomRight()), &intersection); #else type = lineItem->line().intersect(QLineF(limits.bottomLeft(), limits.bottomRight()), &intersection); @@ -822,7 +822,7 @@ void UPlotCurve::draw(QPainter * painter, const QRect & limits) } else { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) type = lineItem->line().intersects(QLineF(limits.topRight(), limits.bottomRight()), &intersection); #else type = lineItem->line().intersect(QLineF(limits.topRight(), limits.bottomRight()), &intersection);