aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--divecomputer.cpp7
-rw-r--r--divecomputer.h3
-rw-r--r--qt-ui/mainwindow.cpp4
3 files changed, 2 insertions, 12 deletions
diff --git a/divecomputer.cpp b/divecomputer.cpp
index f427bd42c..daea390c2 100644
--- a/divecomputer.cpp
+++ b/divecomputer.cpp
@@ -79,13 +79,6 @@ void DiveComputerList::addDC(const QString &m, uint32_t d, const QString &n, con
dcMap.insert(m, newNode);
}
-void DiveComputerList::rmDC(const QString &m, uint32_t d)
-{
- const DiveComputerNode *existNode = this->getExact(m, d);
- dcMap.remove(m, *existNode);
-}
-
-
extern "C" void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname)
{
dcList.addDC(model, deviceid, nickname, serial, firmware);
diff --git a/divecomputer.h b/divecomputer.h
index 54752abf7..81399c47d 100644
--- a/divecomputer.h
+++ b/divecomputer.h
@@ -26,7 +26,6 @@ public:
const DiveComputerNode *getExact(const QString &m, uint32_t d);
const DiveComputerNode *get(const QString &m);
void addDC(const QString &m, uint32_t d, const QString &n = QString(), const QString &s = QString(), const QString &f = QString());
- void rmDC(const QString &m, uint32_t d);
DiveComputerNode matchDC(const QString &m, uint32_t d);
DiveComputerNode matchModel(const QString &m);
QMultiMap<QString, DiveComputerNode> dcMap;
@@ -35,4 +34,4 @@ public:
extern DiveComputerList dcList;
-#endif \ No newline at end of file
+#endif
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index d13585788..3b7333619 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -300,9 +300,7 @@ void MainWindow::closeCurrentFile()
clear_events();
- QList<DiveComputerNode> values = dcList.dcMap.values();
- for (int i = 0; i < values.size(); i++)
- dcList.rmDC(values.at(i).model, values.at(i).deviceId);
+ dcList.dcMap.clear();
}
void MainWindow::on_actionClose_triggered()