mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
Desktop: Fix build for Qt6
This seems to be needed to make the build work with Qt6, which is needed for M1 based Macs. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
e60baff940
commit
15bf145f14
3 changed files with 6 additions and 6 deletions
|
@ -91,11 +91,11 @@ QVariant LocationInformationModel::getDiveSiteData(const struct dive_site *ds, i
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch(column) {
|
switch(column) {
|
||||||
case DIVESITE: return QVariant::fromValue<dive_site *>((dive_site *)ds); // Not nice: casting away const
|
case DIVESITE: return QVariant::fromValue<dive_site *>((dive_site *)ds); // Not nice: casting away const
|
||||||
case NAME: return ds->name;
|
case NAME: return QString(ds->name);
|
||||||
case NUM_DIVES: return ds->dives.nr;
|
case NUM_DIVES: return ds->dives.nr;
|
||||||
case LOCATION: return "TODO";
|
case LOCATION: return "TODO";
|
||||||
case DESCRIPTION: return ds->description;
|
case DESCRIPTION: return QString(ds->description);
|
||||||
case NOTES: return ds->name;
|
case NOTES: return QString(ds->name);
|
||||||
case TAXONOMY: return "TODO";
|
case TAXONOMY: return "TODO";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -59,7 +59,7 @@ QVariant DivesiteImportedModel::data(const QModelIndex &index, int role) const
|
||||||
if (role == Qt::DisplayRole) {
|
if (role == Qt::DisplayRole) {
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case NAME:
|
case NAME:
|
||||||
return ds->name;
|
return QString(ds->name);
|
||||||
case LOCATION:
|
case LOCATION:
|
||||||
return printGPSCoords(&ds->location);
|
return printGPSCoords(&ds->location);
|
||||||
case COUNTRY:
|
case COUNTRY:
|
||||||
|
@ -70,7 +70,7 @@ QVariant DivesiteImportedModel::data(const QModelIndex &index, int role) const
|
||||||
get_dive_site_by_gps_proximity(&ds->location,
|
get_dive_site_by_gps_proximity(&ds->location,
|
||||||
40075000, divelog.sites);
|
40075000, divelog.sites);
|
||||||
if (nearest_ds)
|
if (nearest_ds)
|
||||||
return nearest_ds->name;
|
return QString(nearest_ds->name);
|
||||||
else
|
else
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ QVariant YearStatisticsItem::data(int column, int role) const
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case YEAR:
|
case YEAR:
|
||||||
if (stats_interval.is_trip) {
|
if (stats_interval.is_trip) {
|
||||||
ret = stats_interval.location;
|
ret = QString(stats_interval.location);
|
||||||
} else {
|
} else {
|
||||||
ret = stats_interval.period;
|
ret = stats_interval.period;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue