1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

RecentFileDialog is class instead of struct

This commit is contained in:
Joakim Thorén 2024-11-24 15:17:38 +01:00
parent e3b520a1f1
commit 2678bf1e05

View File

@ -450,10 +450,10 @@ void MainWindow::on_actionOpenRecent_triggered()
QSettings s(Ui::teamName, Ui::appName);
QStringList recentFiles = s.value(recentlyOpenedFilesSetting).toStringList();
struct RecentFileDialog : public QDialog {
RecentFileDialog(QStringList recentFiles, QWidget * parent = nullptr) : QDialog(parent), layout(this)
{
class RecentFileDialog : public QDialog {
public:
RecentFileDialog(QWidget *parent, const QStringList& recentFiles) : QDialog(parent), layout(this) {
setWindowTitle(tr("Recently Opened Files"));
setMinimumWidth(600);
@ -473,6 +473,8 @@ void MainWindow::on_actionOpenRecent_triggered()
layout.addWidget(&listWidget);
}
private:
QVBoxLayout layout;
QListWidget listWidget;
};