summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-11 18:46:14 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-11 12:36:45 -0800
commit507a929a27d31eaf077437674e6ec3cdaaed34d2 (patch)
tree5aa79a268e7359d7a384d03caba656111332e992 /qt-ui/maintab.cpp
parentaf8c44fa22ef6fca6a06fe4ad9e8af949a137458 (diff)
downloadsubsurface-507a929a27d31eaf077437674e6ec3cdaaed34d2.tar.gz
Migrate MainTab models(QStringListModel)
Migrate MainTab models from static xxxCompletioModel::instance() to private MainTab variable members. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 0aa683dcb..bdaddb827 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -89,11 +89,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.weights->view()->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate(this));
// disabled as this column is pointless outside the disabled planner
// ui.cylinders->view()->setColumnHidden(CylindersModel::DEPTH, true);
- completers.buddy = new QCompleter(BuddyCompletionModel::instance(), ui.buddy);
- completers.divemaster = new QCompleter(DiveMasterCompletionModel::instance(), ui.divemaster);
- completers.location = new QCompleter(LocationCompletionModel::instance(), ui.location);
- completers.suit = new QCompleter(SuitCompletionModel::instance(), ui.suit);
- completers.tags = new QCompleter(TagCompletionModel::instance(), ui.tagWidget);
+ completers.buddy = new QCompleter(&buddyModel, ui.buddy);
+ completers.divemaster = new QCompleter(&diveMasterModel, ui.divemaster);
+ completers.location = new QCompleter(&locationModel, ui.location);
+ completers.suit = new QCompleter(&suitModel, ui.suit);
+ completers.tags = new QCompleter(&tagModel, ui.tagWidget);
completers.buddy->setCaseSensitivity(Qt::CaseInsensitive);
completers.divemaster->setCaseSensitivity(Qt::CaseInsensitive);
completers.location->setCaseSensitivity(Qt::CaseInsensitive);
@@ -563,11 +563,11 @@ void MainTab::addWeight_clicked()
void MainTab::reload()
{
- SuitCompletionModel::instance()->updateModel();
- BuddyCompletionModel::instance()->updateModel();
- LocationCompletionModel::instance()->updateModel();
- DiveMasterCompletionModel::instance()->updateModel();
- TagCompletionModel::instance()->updateModel();
+ suitModel.updateModel();
+ buddyModel.updateModel();
+ locationModel.updateModel();
+ diveMasterModel.updateModel();
+ tagModel.updateModel();
}
void MainTab::acceptChanges()