From 68152faf4352d92192a01ca913c518b25798b2d3 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 26 May 2018 18:22:14 +0200 Subject: DolphinQt2: Show cached games before checking whether they exist on disk DolphinWX already has this improvement in startup time, and it matters a lot when you have a large game list. --- Source/Core/DolphinQt2/GameList/GameListModel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/DolphinQt2/GameList/GameListModel.cpp') diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.cpp b/Source/Core/DolphinQt2/GameList/GameListModel.cpp index e57ac80f77..7dd81e047d 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt2/GameList/GameListModel.cpp @@ -28,6 +28,8 @@ GameListModel::GameListModel(QObject* parent) : QAbstractTableModel(parent) for (const QString& dir : Settings::Instance().GetPaths()) m_tracker.AddDirectory(dir); + m_tracker.Start(); + connect(&Settings::Instance(), &Settings::ThemeChanged, [this] { // Tell the view to repaint. The signal 'dataChanged' also seems like it would work here, but // unfortunately it won't cause a repaint until the view is focused. -- cgit v1.2.3 From f2103c1b511d4cc8521a768e132ac6e5ce4651a1 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 26 May 2018 19:04:37 +0200 Subject: DolphinQt2: Avoid an unnecessary string conversion --- Source/Core/DolphinQt2/GameList/GameListModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/DolphinQt2/GameList/GameListModel.cpp') diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.cpp b/Source/Core/DolphinQt2/GameList/GameListModel.cpp index 7dd81e047d..7f26c87435 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt2/GameList/GameListModel.cpp @@ -18,8 +18,7 @@ const QSize GAMECUBE_BANNER_SIZE(96, 32); GameListModel::GameListModel(QObject* parent) : QAbstractTableModel(parent) { connect(&m_tracker, &GameTracker::GameLoaded, this, &GameListModel::UpdateGame); - connect(&m_tracker, &GameTracker::GameRemoved, this, - [this](const QString& path) { RemoveGame(path.toStdString()); }); + connect(&m_tracker, &GameTracker::GameRemoved, this, &GameListModel::RemoveGame); connect(&Settings::Instance(), &Settings::PathAdded, &m_tracker, &GameTracker::AddDirectory); connect(&Settings::Instance(), &Settings::PathRemoved, &m_tracker, &GameTracker::RemoveDirectory); connect(&Settings::Instance(), &Settings::PathReloadRequested, &m_tracker, -- cgit v1.2.3