Qt/GameListSettings: Fix QToolButtons staying highlighted after use
This commit is contained in:
parent
71cef1de3f
commit
a92fd98d7f
|
@ -214,14 +214,14 @@ GameListSettingsWidget::GameListSettingsWidget(QtHostInterface* host_interface,
|
||||||
m_ui.searchDirectoryList->setCurrentIndex({});
|
m_ui.searchDirectoryList->setCurrentIndex({});
|
||||||
|
|
||||||
connect(m_ui.searchDirectoryList, &QTableView::clicked, this, &GameListSettingsWidget::onDirectoryListItemClicked);
|
connect(m_ui.searchDirectoryList, &QTableView::clicked, this, &GameListSettingsWidget::onDirectoryListItemClicked);
|
||||||
connect(m_ui.addSearchDirectoryButton, &QToolButton::pressed, this,
|
connect(m_ui.addSearchDirectoryButton, &QToolButton::clicked, this,
|
||||||
&GameListSettingsWidget::onAddSearchDirectoryButtonPressed);
|
&GameListSettingsWidget::onAddSearchDirectoryButtonClicked);
|
||||||
connect(m_ui.removeSearchDirectoryButton, &QToolButton::pressed, this,
|
connect(m_ui.removeSearchDirectoryButton, &QToolButton::clicked, this,
|
||||||
&GameListSettingsWidget::onRemoveSearchDirectoryButtonPressed);
|
&GameListSettingsWidget::onRemoveSearchDirectoryButtonClicked);
|
||||||
connect(m_ui.rescanAllGames, &QToolButton::pressed, this, &GameListSettingsWidget::onRescanAllGamesPressed);
|
connect(m_ui.rescanAllGames, &QToolButton::clicked, this, &GameListSettingsWidget::onRescanAllGamesClicked);
|
||||||
connect(m_ui.scanForNewGames, &QToolButton::pressed, this, &GameListSettingsWidget::onScanForNewGamesPressed);
|
connect(m_ui.scanForNewGames, &QToolButton::clicked, this, &GameListSettingsWidget::onScanForNewGamesClicked);
|
||||||
connect(m_ui.updateRedumpDatabase, &QToolButton::pressed, this,
|
connect(m_ui.updateRedumpDatabase, &QToolButton::clicked, this,
|
||||||
&GameListSettingsWidget::onUpdateRedumpDatabaseButtonPressed);
|
&GameListSettingsWidget::onUpdateRedumpDatabaseButtonClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameListSettingsWidget::~GameListSettingsWidget() = default;
|
GameListSettingsWidget::~GameListSettingsWidget() = default;
|
||||||
|
@ -265,12 +265,12 @@ void GameListSettingsWidget::addSearchDirectory(QWidget* parent_widget)
|
||||||
m_search_directories_model->addEntry(dir, recursive);
|
m_search_directories_model->addEntry(dir, recursive);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListSettingsWidget::onAddSearchDirectoryButtonPressed()
|
void GameListSettingsWidget::onAddSearchDirectoryButtonClicked()
|
||||||
{
|
{
|
||||||
addSearchDirectory(this);
|
addSearchDirectory(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListSettingsWidget::onRemoveSearchDirectoryButtonPressed()
|
void GameListSettingsWidget::onRemoveSearchDirectoryButtonClicked()
|
||||||
{
|
{
|
||||||
QModelIndexList selection = m_ui.searchDirectoryList->selectionModel()->selectedIndexes();
|
QModelIndexList selection = m_ui.searchDirectoryList->selectionModel()->selectedIndexes();
|
||||||
if (selection.size() < 1)
|
if (selection.size() < 1)
|
||||||
|
@ -280,17 +280,17 @@ void GameListSettingsWidget::onRemoveSearchDirectoryButtonPressed()
|
||||||
m_search_directories_model->removeEntry(row);
|
m_search_directories_model->removeEntry(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListSettingsWidget::onRescanAllGamesPressed()
|
void GameListSettingsWidget::onRescanAllGamesClicked()
|
||||||
{
|
{
|
||||||
m_host_interface->refreshGameList(true, false);
|
m_host_interface->refreshGameList(true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListSettingsWidget::onScanForNewGamesPressed()
|
void GameListSettingsWidget::onScanForNewGamesClicked()
|
||||||
{
|
{
|
||||||
m_host_interface->refreshGameList(false, false);
|
m_host_interface->refreshGameList(false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListSettingsWidget::onUpdateRedumpDatabaseButtonPressed()
|
void GameListSettingsWidget::onUpdateRedumpDatabaseButtonClicked()
|
||||||
{
|
{
|
||||||
if (QMessageBox::question(this, tr("Download database from redump.org?"),
|
if (QMessageBox::question(this, tr("Download database from redump.org?"),
|
||||||
tr("Do you wish to download the disc database from redump.org?\n\nThis will download "
|
tr("Do you wish to download the disc database from redump.org?\n\nThis will download "
|
||||||
|
|
|
@ -21,11 +21,11 @@ public Q_SLOTS:
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void onDirectoryListItemClicked(const QModelIndex& index);
|
void onDirectoryListItemClicked(const QModelIndex& index);
|
||||||
void onAddSearchDirectoryButtonPressed();
|
void onAddSearchDirectoryButtonClicked();
|
||||||
void onRemoveSearchDirectoryButtonPressed();
|
void onRemoveSearchDirectoryButtonClicked();
|
||||||
void onScanForNewGamesPressed();
|
void onScanForNewGamesClicked();
|
||||||
void onRescanAllGamesPressed();
|
void onRescanAllGamesClicked();
|
||||||
void onUpdateRedumpDatabaseButtonPressed();
|
void onUpdateRedumpDatabaseButtonClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent* event);
|
void resizeEvent(QResizeEvent* event);
|
||||||
|
|
Loading…
Reference in New Issue