diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-23 14:57:55 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-23 14:15:49 -0700 |
commit | d586970f3145106d444af8c54651af6563b92a66 (patch) | |
tree | 9fb9f6a6f667c638421060a5335813032fd1cfb9 /qt-ui/locationinformation.cpp | |
parent | e4c0ee32cdcd8487dd88e40fef3ba5de6fa92704 (diff) | |
download | subsurface-d586970f3145106d444af8c54651af6563b92a66.tar.gz |
Removed a ton of dead code
Unused dead code / hack for the old QCompleter
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 77adc819b..3b3e02b12 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -259,61 +259,6 @@ void LocationInformationWidget::resetPallete() ui.diveSiteNotes->setPalette(p); } -bool LocationManagementEditHelper::eventFilter(QObject *obj, QEvent *ev) -{ - QListView *view = qobject_cast<QListView*>(obj); - if(!view) - return false; - - if(ev->type() == QEvent::Show) { - last_uuid = 0; - qDebug() << "EventFilter: " << last_uuid; - } - - if(ev->type() == QEvent::KeyPress) { - QKeyEvent *keyEv = (QKeyEvent*) ev; - if(keyEv->key() == Qt::Key_Return) { - handleActivation(view->currentIndex()); - view->hide(); - return true; - } - } - return false; -} - -void LocationManagementEditHelper::handleActivation(const QModelIndex& activated) -{ - if (!activated.isValid()) - return; - QModelIndex uuidIdx = activated.model()->index( - activated.row(), LocationInformationModel::UUID); - last_uuid = uuidIdx.data().toInt(); - - /* if we are in 'recently added divesite mode, create a new divesite, - * and go to dive site edit edit mode. */ - if (last_uuid == RECENTLY_ADDED_DIVESITE) { - uint32_t ds_uuid = create_dive_site_from_current_dive(qPrintable(activated.data().toString())); - qDebug() << "ds_uuid" << ds_uuid; - struct dive_site *ds = get_dive_site_by_uuid(ds_uuid); - copy_dive_site(ds, &displayed_dive_site); - displayed_dive.dive_site_uuid = ds->uuid; - last_uuid = ds->uuid; - // Move this out of here later. - MainWindow::instance()->startDiveSiteEdit(); - } - - qDebug() << "Selected dive_site: " << last_uuid; -} - -void LocationManagementEditHelper::resetDiveSiteUuid() { - last_uuid = 0; - qDebug() << "Reset: " << last_uuid; -} - -uint32_t LocationManagementEditHelper::diveSiteUuid() const { - return last_uuid; -} - void LocationInformationWidget::reverseGeocode() { ReverseGeoLookupThread *geoLookup = ReverseGeoLookupThread::instance(); |