From 2134d99d0c98603fa5182fe1946bc330e44ad9ed Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 3 Mar 2019 16:24:18 +0100 Subject: Cleanup: Remove dead code when picking a new dive site When a new dive site is created in MainTab::updateDiveSite() and there is no text, it gets a generic name. But: the function exits early if there is no text, so this is dead code. Remove. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/maintab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 7f30c8962..edabd41fe 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -657,7 +657,7 @@ struct dive_site *MainTab::updateDiveSite(struct dive_site *pickedDs, dive *d) return origDs; if (pickedDs == RECENTLY_ADDED_DIVESITE) { - QString name = ui.location->text().isEmpty() ? tr("New dive site") : ui.location->text(); + QString name = ui.location->text(); pickedDs = create_dive_site(qPrintable(name), displayed_dive.when, &dive_site_table); createdNewDive = true; } -- cgit v1.2.3-70-g09d2