summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-07-01 18:35:55 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-01 18:54:19 -0700
commit324b6182aa46fa8eb6c2c60c9fdcb40e00da6b32 (patch)
treea6eaf6a0ad04b3f877da05cb8a012ad5bcec566c
parentb8ae4c50b4d7db920ee8d19a880c73fe46f36528 (diff)
downloadsubsurface-324b6182aa46fa8eb6c2c60c9fdcb40e00da6b32.tar.gz
Remove location completion model
This is a functional but hard to expand model for the dive sites. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-models/completionmodels.cpp13
-rw-r--r--qt-ui/maintab.cpp8
2 files changed, 0 insertions, 21 deletions
diff --git a/qt-models/completionmodels.cpp b/qt-models/completionmodels.cpp
index f2e70afd1..ff2afd997 100644
--- a/qt-models/completionmodels.cpp
+++ b/qt-models/completionmodels.cpp
@@ -42,19 +42,6 @@ CREATE_CSV_UPDATE_METHOD(BuddyCompletionModel, buddy);
CREATE_CSV_UPDATE_METHOD(DiveMasterCompletionModel, divemaster);
CREATE_UPDATE_METHOD(SuitCompletionModel, suit);
-void LocationCompletionModel::updateModel()
-{
- QStringList list;
- struct dive_site *ds;
- int i = 0;
- for_each_dive_site(i, ds) {
- if (!list.contains(ds->name))
- list.append(ds->name);
- }
- std::sort(list.begin(), list.end());
- setStringList(list);
-}
-
void TagCompletionModel::updateModel()
{
if (g_tag_list == NULL)
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index d60e22a79..1236c949d 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -100,8 +100,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
connect(ui.cylinders->view(), SIGNAL(clicked(QModelIndex)), this, SLOT(editCylinderWidget(QModelIndex)));
connect(ui.weights->view(), SIGNAL(clicked(QModelIndex)), this, SLOT(editWeightWidget(QModelIndex)));
- LocationCompletionModel *locationCompletion = new LocationCompletionModel();
- ui.location->setCompleter(new QCompleter(locationCompletion));
ui.location->completer()->setCaseSensitivity(Qt::CaseInsensitive);
ui.location->completer()->setCompletionMode(QCompleter::PopupCompletion);
@@ -470,9 +468,6 @@ void MainTab::updateDiveInfo(bool clear)
struct dive *prevd;
char buf[1024];
- LocationCompletionModel *m = qobject_cast<LocationCompletionModel*>(ui.location->completer()->model());
- m->updateModel();
-
process_selected_dives();
process_all_dives(&displayed_dive, &prevd);
@@ -749,7 +744,6 @@ void MainTab::reload()
{
suitModel.updateModel();
buddyModel.updateModel();
- locationModel.updateModel();
diveMasterModel.updateModel();
tagModel.updateModel();
}
@@ -1363,8 +1357,6 @@ void MainTab::on_location_editingFinished()
markChangedWidget(ui.location);
LocationInformationModel::instance()->update();
- LocationCompletionModel *m = qobject_cast<LocationCompletionModel*>(ui.location->completer()->model());
- m->updateModel();
emit diveSiteChanged(uuid);
return;
}