mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Better invalid dive site name
This should ensure that no one ever might end up with our "invalid" name for real. And it allows us to more easily test elsewhere for that invalid value. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c78e4fb92d
commit
2a4cacda21
2 changed files with 5 additions and 2 deletions
|
@ -69,9 +69,10 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons
|
|||
if (index.row() == 1) {
|
||||
struct dive_site *ds = get_dive_site_name_start_which_str(textField->text());
|
||||
if (!ds)
|
||||
return "NOT HERE";
|
||||
return INVALID_DIVE_SITE_NAME;
|
||||
if (QString(ds->name) == textField->text())
|
||||
return "NOT HERE";
|
||||
return INVALID_DIVE_SITE_NAME;
|
||||
|
||||
}
|
||||
return textField->text();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue