From 0dd36d3c4b76261a671171c181a06f1bd137da12 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Sat, 29 Jun 2024 14:55:56 +0200 Subject: [PATCH] replace deprecated functions --- mapeditor/mapsettings/generalsettings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapeditor/mapsettings/generalsettings.cpp b/mapeditor/mapsettings/generalsettings.cpp index 525a0b556..aa7d28206 100644 --- a/mapeditor/mapsettings/generalsettings.cpp +++ b/mapeditor/mapsettings/generalsettings.cpp @@ -31,7 +31,7 @@ void GeneralSettings::initialize(MapController & c) ui->mapDescriptionEdit->setPlainText(QString::fromStdString(controller->map()->description.toString())); ui->authorEdit->setText(QString::fromStdString(controller->map()->author.toString())); ui->authorContactEdit->setText(QString::fromStdString(controller->map()->authorContact.toString())); - ui->mapCreationDateTimeEdit->setDateTime(QDateTime::fromTime_t(controller->map()->creationDateTime)); + ui->mapCreationDateTimeEdit->setDateTime(QDateTime::fromSecsSinceEpoch(controller->map()->creationDateTime)); ui->mapVersionEdit->setText(QString::fromStdString(controller->map()->mapVersion.toString())); ui->heroLevelLimit->setValue(controller->map()->levelLimit); ui->heroLevelLimitCheck->setChecked(controller->map()->levelLimit); @@ -67,7 +67,7 @@ void GeneralSettings::update() controller->map()->description = MetaString::createFromTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "description"), ui->mapDescriptionEdit->toPlainText().toStdString())); controller->map()->author = MetaString::createFromRawString(ui->authorEdit->text().toStdString()); controller->map()->authorContact = MetaString::createFromRawString(ui->authorContactEdit->text().toStdString()); - controller->map()->creationDateTime = ui->mapCreationDateTimeEdit->dateTime().toTime_t(); + controller->map()->creationDateTime = ui->mapCreationDateTimeEdit->dateTime().toSecsSinceEpoch(); controller->map()->mapVersion = MetaString::createFromRawString(ui->mapVersionEdit->text().toStdString()); if(ui->heroLevelLimitCheck->isChecked()) controller->map()->levelLimit = ui->heroLevelLimit->value();