From 2678bf1e05a89a694c39ca8f3f8f78ee3a5d260e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Thor=C3=A9n?= Date: Sun, 24 Nov 2024 15:17:38 +0100 Subject: [PATCH] RecentFileDialog is class instead of struct --- mapeditor/mainwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp index f87907c71..041651389 100644 --- a/mapeditor/mainwindow.cpp +++ b/mapeditor/mainwindow.cpp @@ -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; };