From fdec250723549453e714580724231ee2fb866907 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 22 Sep 2015 14:13:51 -0300 Subject: [PATCH] Whitespace fix Sorry. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/locationinformation.cpp | 62 +++++++++++++++++------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 68096db84..a66b96c19 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -521,42 +521,42 @@ void DiveLocationLineEdit::keyPressEvent(QKeyEvent *ev) void DiveLocationLineEdit::showPopup() { - const QRect screen = QApplication::desktop()->availableGeometry(this); - const int maxVisibleItems = 5; - Qt::LayoutDirection dir = layoutDirection(); - QPoint pos; - int rh, w; - int h = (view->sizeHintForRow(0) * qMin(maxVisibleItems, view->model()->rowCount()) + 3) + 3; - QScrollBar *hsb = view->horizontalScrollBar(); - if (hsb && hsb->isVisible()) - h += view->horizontalScrollBar()->sizeHint().height(); + const QRect screen = QApplication::desktop()->availableGeometry(this); + const int maxVisibleItems = 5; + Qt::LayoutDirection dir = layoutDirection(); + QPoint pos; + int rh, w; + int h = (view->sizeHintForRow(0) * qMin(maxVisibleItems, view->model()->rowCount()) + 3) + 3; + QScrollBar *hsb = view->horizontalScrollBar(); + if (hsb && hsb->isVisible()) + h += view->horizontalScrollBar()->sizeHint().height(); - rh = height(); - pos = mapToGlobal(QPoint(0, height() - 2)); - w = width(); + rh = height(); + pos = mapToGlobal(QPoint(0, height() - 2)); + w = width(); - if (w > screen.width()) - w = screen.width(); - if ((pos.x() + w) > (screen.x() + screen.width())) - pos.setX(screen.x() + screen.width() - w); - if (pos.x() < screen.x()) - pos.setX(screen.x()); + if (w > screen.width()) + w = screen.width(); + if ((pos.x() + w) > (screen.x() + screen.width())) + pos.setX(screen.x() + screen.width() - w); + if (pos.x() < screen.x()) + pos.setX(screen.x()); - int top = pos.y() - rh - screen.top() + 2; - int bottom = screen.bottom() - pos.y(); - h = qMax(h, view->minimumHeight()); - if (h > bottom) { - h = qMin(qMax(top, bottom), h); - if (top > bottom) - pos.setY(pos.y() - h - rh + 2); - } + int top = pos.y() - rh - screen.top() + 2; + int bottom = screen.bottom() - pos.y(); + h = qMax(h, view->minimumHeight()); + if (h > bottom) { + h = qMin(qMax(top, bottom), h); + if (top > bottom) + pos.setY(pos.y() - h - rh + 2); + } - view->setGeometry(pos.x(), pos.y(), w, h); + view->setGeometry(pos.x(), pos.y(), w, h); - if (!view->isVisible()) { - view->show(); - view->setFocus(); - } + if (!view->isVisible()) { + view->show(); + view->setFocus(); + } } DiveLocationListView::DiveLocationListView(QWidget *parent)