mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
DolphinQt: Make use of the C++11 signal/slot connection syntax.
Also use lambdas over one-line functions in some cases.
This commit is contained in:
@ -22,7 +22,7 @@ DGameGrid::DGameGrid(QWidget* parent_widget) :
|
||||
m_ui->setupUi(this);
|
||||
SetViewStyle(STYLE_GRID);
|
||||
|
||||
connect(this, SIGNAL(itemActivated(QListWidgetItem*)), this, SIGNAL(StartGame()));
|
||||
connect(this, &QListWidget::itemActivated, this, &DGameGrid::StartGame);
|
||||
}
|
||||
|
||||
DGameGrid::~DGameGrid()
|
||||
|
@ -27,15 +27,15 @@ DGameTracker::DGameTracker(QWidget* parent_widget)
|
||||
: QStackedWidget(parent_widget),
|
||||
m_watcher(new QFileSystemWatcher(this))
|
||||
{
|
||||
connect(m_watcher, SIGNAL(directoryChanged(QString)), this, SLOT(ScanForGames()));
|
||||
connect(m_watcher, &QFileSystemWatcher::directoryChanged, this, &DGameTracker::ScanForGames);
|
||||
|
||||
m_tree_widget = new DGameTree(this);
|
||||
addWidget(m_tree_widget);
|
||||
connect(m_tree_widget, SIGNAL(StartGame()), this, SIGNAL(StartGame()));
|
||||
connect(m_tree_widget, &DGameTree::StartGame, this, &DGameTracker::StartGame);
|
||||
|
||||
m_grid_widget = new DGameGrid(this);
|
||||
addWidget(m_grid_widget);
|
||||
connect(m_grid_widget, SIGNAL(StartGame()), this, SIGNAL(StartGame()));
|
||||
connect(m_grid_widget, &DGameGrid::StartGame, this, &DGameTracker::StartGame);
|
||||
|
||||
SetViewStyle(STYLE_LIST);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ DGameTree::DGameTree(QWidget* parent_widget) :
|
||||
setIconSize(QSize(BANNER_WIDTH, BANNER_HEIGHT));
|
||||
sortByColumn(COL_TITLE, Qt::AscendingOrder);
|
||||
|
||||
connect(this, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this, SLOT(ItemActivated(QTreeWidgetItem*)));
|
||||
connect(this, &QTreeWidget::itemActivated, this, &DGameTree::ItemActivated);
|
||||
}
|
||||
|
||||
DGameTree::~DGameTree()
|
||||
|
Reference in New Issue
Block a user