mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: turn struct dive string data into std::string
Much easier memory management! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2b3d2f1020
commit
3cb04d230b
34 changed files with 208 additions and 313 deletions
|
@ -118,7 +118,7 @@ void TabDiveEquipment::divesChanged(const QVector<dive *> &dives, DiveField fiel
|
|||
return;
|
||||
|
||||
if (field.suit)
|
||||
ui.suit->setText(QString(parent.currentDive->suit));
|
||||
ui.suit->setText(QString::fromStdString(parent.currentDive->suit));
|
||||
}
|
||||
|
||||
void TabDiveEquipment::toggleTriggeredColumn()
|
||||
|
@ -145,8 +145,8 @@ void TabDiveEquipment::updateData(const std::vector<dive *> &, dive *currentDive
|
|||
sensorDelegate.setCurrentDC(dc);
|
||||
tankUseDelegate.setCurrentDC(dc);
|
||||
|
||||
if (currentDive && currentDive->suit)
|
||||
ui.suit->setText(QString(currentDive->suit));
|
||||
if (currentDive && !currentDive->suit.empty())
|
||||
ui.suit->setText(QString::fromStdString(currentDive->suit));
|
||||
else
|
||||
ui.suit->clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue