game_list: fix deprecation warning
We only need to check if the data is valid for clicks on empty space in the game grid. I don't remember why I initially checked < 0
This commit is contained in:
@@ -12,14 +12,7 @@ class game_list : public QTableWidget
|
||||
private:
|
||||
void mousePressEvent(QMouseEvent *event) override
|
||||
{
|
||||
#ifndef _MSC_VER
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
if (!indexAt(event->pos()).isValid() || itemAt(event->pos())->data(Qt::UserRole) < 0)
|
||||
#ifndef _MSC_VER
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
if (!indexAt(event->pos()).isValid() || !itemAt(event->pos())->data(Qt::UserRole).isValid())
|
||||
{
|
||||
clearSelection();
|
||||
setCurrentItem(nullptr); // Needed for currentItemChanged
|
||||
|
||||
Reference in New Issue
Block a user