planner: use std::string in plannernotes.cpp

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-08 10:44:20 +01:00 committed by bstoeger
parent 8b51ff7ded
commit 4db19d6284
5 changed files with 120 additions and 129 deletions

View file

@ -609,13 +609,12 @@ void PlannerWidgets::replanDive(int currentDC)
void PlannerWidgets::printDecoPlan()
{
#ifndef NO_PRINTING
char *disclaimer = get_planner_disclaimer_formatted();
std::string disclaimer = get_planner_disclaimer_formatted();
// Prepend a logo and a disclaimer to the plan.
// Save the old plan so that it can be restored at the end of the function.
QString origPlan = plannerDetails.divePlanOutput()->toHtml();
QString diveplan = QStringLiteral("<img height=50 src=\":subsurface-icon\"> ") +
QString(disclaimer) + origPlan;
free(disclaimer);
QString::fromStdString(disclaimer) + origPlan;
QPrinter printer;
QPrintDialog dialog(&printer, MainWindow::instance());