diff options
author | Lioncash <mathew1800@gmail.com> | 2016-12-10 21:20:34 -0500 |
---|---|---|
committer | linkmauve <linkmauve@linkmauve.fr> | 2016-12-11 11:45:50 +0000 |
commit | dd4582f85de43806ab3bf904bf13641d5d1aa3ba (patch) | |
tree | 27390023eb1f0927ad1a3fb2a367c4fb3b04dcb6 /src | |
parent | fd3d56740ecd76450a5ed883bec66fe9ecb23334 (diff) |
game_list: Use QT5's new event connection syntax
Makes for more compact code in most places.
Diffstat (limited to 'src')
-rw-r--r-- | src/citra_qt/game_list.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index 2863e5da6..df712c14f 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp @@ -34,8 +34,7 @@ GameList::GameList(QWidget* parent) : QWidget{parent} { item_model->setHeaderData(COLUMN_FILE_TYPE, Qt::Horizontal, "File type"); item_model->setHeaderData(COLUMN_SIZE, Qt::Horizontal, "Size"); - connect(tree_view, SIGNAL(activated(const QModelIndex&)), this, - SLOT(ValidateEntry(const QModelIndex&))); + connect(tree_view, &QTreeView::activated, this, &GameList::ValidateEntry); // We must register all custom types with the Qt Automoc system so that we are able to use it // with @@ -86,12 +85,13 @@ void GameList::PopulateAsync(const QString& dir_path, bool deep_scan) { emit ShouldCancelWorker(); GameListWorker* worker = new GameListWorker(dir_path, deep_scan); - connect(worker, SIGNAL(EntryReady(QList<QStandardItem*>)), this, - SLOT(AddEntry(QList<QStandardItem*>)), Qt::QueuedConnection); - connect(worker, SIGNAL(Finished()), this, SLOT(DonePopulating()), Qt::QueuedConnection); + connect(worker, &GameListWorker::EntryReady, this, &GameList::AddEntry, Qt::QueuedConnection); + connect(worker, &GameListWorker::Finished, this, &GameList::DonePopulating, + Qt::QueuedConnection); // Use DirectConnection here because worker->Cancel() is thread-safe and we want it to cancel // without delay. - connect(this, SIGNAL(ShouldCancelWorker()), worker, SLOT(Cancel()), Qt::DirectConnection); + connect(this, &GameList::ShouldCancelWorker, worker, &GameListWorker::Cancel, + Qt::DirectConnection); QThreadPool::globalInstance()->start(worker); current_worker = std::move(worker); |