1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-29 21:56:54 +02:00

move translation out of constructor

This commit is contained in:
Laserlicht 2025-01-02 23:13:24 +01:00
parent bdf778a80a
commit 3e44dd6a88

View File

@ -459,8 +459,6 @@ void MainWindow::on_actionOpenRecent_triggered()
RecentFileDialog(const QStringList& recentFiles, QWidget *parent)
: QDialog(parent), layout(new QVBoxLayout(this)), listWidget(new QListWidget(this))
{
parent->setWindowTitle(tr("Recently Opened Files"));
setMinimumWidth(600);
connect(listWidget, &QListWidget::itemActivated, this, [this](QListWidgetItem *item)
@ -496,6 +494,7 @@ void MainWindow::on_actionOpenRecent_triggered()
};
RecentFileDialog d(recentFiles, this);
d.setWindowTitle(tr("Recently Opened Files"));
if(d.exec() == QDialog::Accepted && getAnswerAboutUnsavedChanges())
{
openMap(d.getSelectedFilePath());