From d586970f3145106d444af8c54651af6563b92a66 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 23 Sep 2015 14:57:55 -0300 Subject: Removed a ton of dead code Unused dead code / hack for the old QCompleter Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) (limited to 'qt-ui/maintab.cpp') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index a68adb5bf..8dca49eee 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -195,7 +195,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), connect(ReverseGeoLookupThread::instance(), &QThread::finished, this, &MainTab::setCurrentLocationIndex); - ui.location->installEventFilter(this); acceptingEdit = false; } @@ -210,33 +209,6 @@ MainTab::~MainTab() } } -bool MainTab::eventFilter(QObject *obj, QEvent *ev) -{ - QMoveEvent *mEv; - QResizeEvent *rEv; - QLineEdit *line = qobject_cast(obj); - - if (ev->type() == QEvent::MouseMove || ev->type() == QEvent::HoverMove || ev->type() == QEvent::Paint) - return false; - - if (line) { - if (ev->type() == QEvent::Resize) { - /*if (line->completer()->popup()->isVisible()) { - QListView *choices = qobject_cast(line->completer()->popup()); - QPoint p = ui.location->mapToGlobal(ui.location->pos()); - choices->setGeometry( - choices->geometry().x(), - p.y() + 3, - choices->geometry().width(), - choices->geometry().height()); - - } - */ - } - } - return false; -} - void MainTab::setCurrentLocationIndex() { if (current_dive) { @@ -318,12 +290,6 @@ void MainTab::displayMessage(QString str) ui.diveStatisticsMessage->setText(str); ui.diveStatisticsMessage->animatedShow(); updateTextLabels(); - -// TODO: this doesn't exists anymore. Find out why it was removed from -// the KMessageWidget and try to see if this is still needed. -// ui.tagWidget->fixPopupPosition(ui.diveNotesMessage->bestContentHeight()); -// ui.buddy->fixPopupPosition(ui.diveNotesMessage->bestContentHeight()); -// ui.divemaster->fixPopupPosition(ui.diveNotesMessage->bestContentHeight()); } void MainTab::updateTextLabels(bool showUnits) @@ -377,7 +343,6 @@ void MainTab::enableEdition(EditMode newEditMode) displayMessage(tr("Multiple dives are being edited.")); } else { displayMessage(tr("This dive is being edited.")); - //locationManagementEditHelper->resetDiveSiteUuid(); } editMode = newEditMode != NONE ? newEditMode : DIVE; } @@ -844,7 +809,6 @@ void MainTab::updateDisplayedDiveSite() const uint32_t orig_uuid = displayed_dive_site.uuid; //TODO: FIX THIS const uint32_t new_uuid = orig_uuid; - // locationManagementEditHelper->diveSiteUuid(); qDebug() << "Updating Displayed Dive Site"; @@ -891,7 +855,7 @@ void MainTab::updateDiveSite(int divenr) return; const uint32_t newUuid = displayed_dive_site.uuid; - const uint32_t pickedUuid = locationManagementEditHelper->diveSiteUuid(); + const uint32_t pickedUuid = ui.location->currDiveSiteUuid(); const QString newName = displayed_dive_site.name; const uint32_t origUuid = cd->dive_site_uuid; struct dive_site *origDs = get_dive_site_by_uuid(origUuid); -- cgit v1.2.3-70-g09d2