diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 53f0e6d94..d2ece3f17 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -632,7 +632,7 @@ void DiveLocationLineEdit::fixPopupPosition() const int maxVisibleItems = 5; QPoint pos; int rh, w; - int h = (view->sizeHintForRow(0) * qMin(maxVisibleItems, view->model()->rowCount()) + 3) + 3; + int h = (view->sizeHintForRow(0) * std::min(maxVisibleItems, view->model()->rowCount()) + 3) + 3; QScrollBar *hsb = view->horizontalScrollBar(); if (hsb && hsb->isVisible()) h += view->horizontalScrollBar()->sizeHint().height(); @@ -650,9 +650,9 @@ void DiveLocationLineEdit::fixPopupPosition() int top = pos.y() - rh - screen.top() + 2; int bottom = screen.bottom() - pos.y(); - h = qMax(h, view->minimumHeight()); + h = std::max(h, view->minimumHeight()); if (h > bottom) { - h = qMin(qMax(top, bottom), h); + h = std::min(std::max(top, bottom), h); if (top > bottom) pos.setY(pos.y() - h - rh + 2); } diff --git a/desktop-widgets/modeldelegates.cpp b/desktop-widgets/modeldelegates.cpp index 070f7d7ab..30936425e 100644 --- a/desktop-widgets/modeldelegates.cpp +++ b/desktop-widgets/modeldelegates.cpp @@ -35,7 +35,7 @@ QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const { const QFontMetrics metrics(qApp->font()); - return QSize(50, qMax(22, metrics.height())); + return QSize(50, std::max(22, metrics.height())); } // Gets the index of the model in the currentRow and column.