Skip to content

Commit

Permalink
Fixed compilation warnings on 22.04 (Qt 5.15.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Jun 2, 2024
1 parent 098301e commit 5b810da
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions guilib/src/DatabaseViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ void DatabaseViewer::updateIds()
UINFO("Loading all IDs...");
std::set<int> ids;
dbDriver_->getAllNodeIds(ids);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3)
ids_ = QList<int>(ids.begin(), ids.end());
#else
ids_ = QList<int>::fromStdList(std::list<int>(ids.begin(), ids.end()));
Expand Down Expand Up @@ -3960,7 +3960,7 @@ void DatabaseViewer::regenerateCurrentLocalMaps()
QSet<int> 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<int> ids(idsSet.begin(), idsSet.end());
#else
QList<int> ids = idsSet.toList();
Expand Down
2 changes: 1 addition & 1 deletion guilib/src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5078,7 +5078,7 @@ void MainWindow::drawKeypoints(const std::multimap<int, cv::KeyPoint> & refWords
_lastId = (*refWords.rbegin()).first;
}
std::list<int> kpts = uKeysList(refWords);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3)
_lastIds = QSet<int>(kpts.begin(), kpts.end());
#else
_lastIds = QSet<int>::fromList(QList<int>::fromStdList(kpts));
Expand Down
3 changes: 0 additions & 3 deletions guilib/src/ui/mainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QDockWidget" name="dockWidget_posterior">
<property name="features">
<set>QDockWidget::AllDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>A posteriori PDF</string>
</property>
Expand Down
2 changes: 1 addition & 1 deletion guilib/src/ui/preferencesDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10828,7 +10828,7 @@ generate the number of words requested.</string>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_755">
<widget class="QLabel" name="label_7551">
<property name="text">
<string>If true, SSC (Suppression via Square Covering) is applied to limit keypoints.</string>
</property>
Expand Down
8 changes: 4 additions & 4 deletions guilib/src/utilite/UPlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 5b810da

Please sign in to comment.