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:
parent
e3b520a1f1
commit
2678bf1e05
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user