mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert divesite strings to std::string
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3916125786
commit
7d3977481a
38 changed files with 181 additions and 222 deletions
|
@ -1068,9 +1068,9 @@ bool QMLManager::checkLocation(DiveSiteChange &res, struct dive *d, QString loca
|
|||
{
|
||||
struct dive_site *ds = get_dive_site_for_dive(d);
|
||||
bool changed = false;
|
||||
QString oldLocation = get_dive_location(d);
|
||||
QString oldLocation = QString::fromStdString(get_dive_location(d));
|
||||
if (oldLocation != location) {
|
||||
ds = get_dive_site_by_name(qPrintable(location), divelog.sites);
|
||||
ds = get_dive_site_by_name(location.toStdString(), divelog.sites);
|
||||
if (!ds && !location.isEmpty()) {
|
||||
res.createdDs = std::make_unique<dive_site>(qPrintable(location));
|
||||
res.changed = true;
|
||||
|
@ -1817,9 +1817,7 @@ QString QMLManager::getVersion() const
|
|||
|
||||
QString QMLManager::getGpsFromSiteName(const QString &siteName)
|
||||
{
|
||||
struct dive_site *ds;
|
||||
|
||||
ds = get_dive_site_by_name(qPrintable(siteName), divelog.sites);
|
||||
struct dive_site *ds = get_dive_site_by_name(siteName.toStdString(), divelog.sites);
|
||||
if (!ds)
|
||||
return QString();
|
||||
return printGPSCoords(&ds->location);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue