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:
Berthold Stoeger 2024-05-29 20:40:18 +02:00 committed by bstoeger
parent 2b3d2f1020
commit 3cb04d230b
34 changed files with 208 additions and 313 deletions

View file

@ -328,17 +328,17 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button)
if (what->divesite && current_dive->dive_site)
text << tr("Dive site: ") << QString::fromStdString(current_dive->dive_site->name) << "\n";
if (what->diveguide)
text << tr("Dive guide: ") << current_dive->diveguide << "\n";
text << tr("Dive guide: ") << QString::fromStdString(current_dive->diveguide) << "\n";
if (what->buddy)
text << tr("Buddy: ") << current_dive->buddy << "\n";
text << tr("Buddy: ") << QString::fromStdString(current_dive->buddy) << "\n";
if (what->rating)
text << tr("Rating: ") + QString("*").repeated(current_dive->rating) << "\n";
if (what->visibility)
text << tr("Visibility: ") + QString("*").repeated(current_dive->visibility) << "\n";
if (what->notes)
text << tr("Notes:\n") << current_dive->notes << "\n";
text << tr("Notes:\n") << QString::fromStdString(current_dive->notes) << "\n";
if (what->suit)
text << tr("Suit: ") << current_dive->suit << "\n";
text << tr("Suit: ") << QString::fromStdString(current_dive->suit) << "\n";
if (what-> tags) {
text << tr("Tags: ");
for (const divetag *tag: current_dive->tags)