mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
replace deprecated functions
This commit is contained in:
parent
aa506e33b9
commit
0dd36d3c4b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user