11/* TombRaiderLinuxLauncher
2- * Martin Bångens Copyright (C) 2024
2+ * Martin Bångens Copyright (C) 2025
33 * This program is free software: you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
55 * the Free Software Foundation, either version 3 of the License, or
@@ -30,12 +30,10 @@ void Controller::initializeThread() {
3030 controllerThread->start ();
3131
3232 // Using the controller thread to start model work
33- /*
34- connect(this, &Controller::checkCommonFilesThreadSignal,
35- this, [this]() {
36- model.checkCommonFiles();
33+ connect (this , &Controller::getCoverListThreadSignal,
34+ this , [this ](QVector<ListItemData*>* items) {
35+ model.getCoverList (items);
3736 });
38- */
3937
4038 connect (this , &Controller::setupThreadSignal,
4139 this , [this ](const QString& level, const QString& game) {
@@ -72,6 +70,11 @@ void Controller::initializeThread() {
7270 this , [this ](const QList<int >& availableGames) {
7371 emit controllerGenerateList (availableGames);
7472 }, Qt::QueuedConnection);
73+
74+ connect (&model, &Model::modelReloadLevelListSignal,
75+ this , [this ]() {
76+ emit controllerReloadLevelList ();
77+ }, Qt::QueuedConnection);
7578}
7679
7780void Controller::checkCommonFiles () {
@@ -82,6 +85,10 @@ void Controller::setup(const QString& level, const QString& game) {
8285 emit setupThreadSignal (level, game);
8386}
8487
88+ void Controller::getCoverList (QVector<ListItemData*>* items) {
89+ emit getCoverListThreadSignal (items);
90+ }
91+
8592void Controller::setupGame (int id) {
8693 emit setupGameThreadSignal (id);
8794}
@@ -99,10 +106,6 @@ void Controller::getList(QVector<ListItemData>* list) {
99106 model.getList (list);
100107}
101108
102- void Controller::getCoverList (QVector<ListItemData*>* list) {
103- model.getCoverList (list);
104- }
105-
106109const InfoData Controller::getInfo (int id) {
107110 return model.getInfo (id);
108111}
0 commit comments