summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divecomputermanagementdialog.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-06-16 14:06:35 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-17 06:53:13 +0900
commit1f654050fa7e461166ee4d8b46d66b4ca91f31d4 (patch)
treef6158e8fc750ccd5de64b15a04a242f72ca3cd67 /desktop-widgets/divecomputermanagementdialog.cpp
parent8e8cd7a8d9304b96cc80fbd2ea63e28d9f7595a3 (diff)
downloadsubsurface-1f654050fa7e461166ee4d8b46d66b4ca91f31d4.tar.gz
Dive computers: turn QMultiMap into sorted vector
The list of known dive computers was stored in a multi-map indexed by the device name. Turn this into a sorted QVector. Thus, no map-to-list conversion is needed in the device editing dialog, which distinctly simplifies the code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divecomputermanagementdialog.cpp')
-rw-r--r--desktop-widgets/divecomputermanagementdialog.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/desktop-widgets/divecomputermanagementdialog.cpp b/desktop-widgets/divecomputermanagementdialog.cpp
index 179a69cfb..f060e3715 100644
--- a/desktop-widgets/divecomputermanagementdialog.cpp
+++ b/desktop-widgets/divecomputermanagementdialog.cpp
@@ -19,8 +19,7 @@ DiveComputerManagementDialog::DiveComputerManagementDialog(QWidget *parent, Qt::
void DiveComputerManagementDialog::init()
{
- model.reset(new DiveComputerModel(dcList.dcMap));
- model->update();
+ model.reset(new DiveComputerModel);
ui.tableView->setModel(model.data());
ui.tableView->resizeColumnsToContents();
ui.tableView->setColumnWidth(DiveComputerModel::REMOVE, 22);
@@ -57,7 +56,6 @@ void DiveComputerManagementDialog::accept()
void DiveComputerManagementDialog::reject()
{
- model->dropWorkingList();
hide();
close();
}