simplify (thx raziel)

This commit is contained in:
ElBread3 2024-08-08 10:24:29 -05:00
parent 56ac01059c
commit 80355ba4a8
5 changed files with 3 additions and 5 deletions

View File

@ -37,7 +37,6 @@ GameGridFrame::GameGridFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidg
crtColumn = this->currentColumn(); crtColumn = this->currentColumn();
columnCnt = this->columnCount(); columnCnt = this->columnCount();
}); });
connect(this, &QTableWidget::cellDoubleClicked, this, &MainWindow::StartGame);
} }
void GameGridFrame::PopulateGameGrid(QVector<GameInfo> m_games_search, bool fromSearch) { void GameGridFrame::PopulateGameGrid(QVector<GameInfo> m_games_search, bool fromSearch) {

View File

@ -19,7 +19,6 @@
#include "game_info.h" #include "game_info.h"
#include "game_list_utils.h" #include "game_list_utils.h"
#include "gui_context_menus.h" #include "gui_context_menus.h"
#include "main_window.h"
class GameGridFrame : public QTableWidget { class GameGridFrame : public QTableWidget {
Q_OBJECT Q_OBJECT

View File

@ -54,8 +54,6 @@ GameListFrame::GameListFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidg
connect(this->horizontalScrollBar(), &QScrollBar::valueChanged, this, connect(this->horizontalScrollBar(), &QScrollBar::valueChanged, this,
&GameListFrame::RefreshListBackgroundImage); &GameListFrame::RefreshListBackgroundImage);
connect(this, &QTableWidget::cellDoubleClicked, this, &MainWindow::StartGame);
this->horizontalHeader()->setSortIndicatorShown(true); this->horizontalHeader()->setSortIndicatorShown(true);
this->horizontalHeader()->setSectionsClickable(true); this->horizontalHeader()->setSectionsClickable(true);
QObject::connect( QObject::connect(

View File

@ -20,7 +20,6 @@
#include "game_info.h" #include "game_info.h"
#include "game_list_utils.h" #include "game_list_utils.h"
#include "gui_context_menus.h" #include "gui_context_menus.h"
#include "main_window.h"
class GameListFrame : public QTableWidget { class GameListFrame : public QTableWidget {
Q_OBJECT Q_OBJECT

View File

@ -180,6 +180,9 @@ void MainWindow::CreateConnects() {
}); });
connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame); connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame);
connect(m_game_list_grid.get(), &QTableWidget::cellDoubleClicked, this, &MainWindow::StartGame);
connect(m_game_list_frame.get(), &QTableWidget::cellDoubleClicked, this,
&MainWindow::StartGame);
connect(ui->setIconSizeTinyAct, &QAction::triggered, this, [this]() { connect(ui->setIconSizeTinyAct, &QAction::triggered, this, [this]() {
if (isTableList) { if (isTableList) {