mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-02 04:36:57 -06:00
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:
parent
1ad0f24ecd
commit
ed1b8f2545
@ -12,14 +12,7 @@ class game_list : public QTableWidget
|
|||||||
private:
|
private:
|
||||||
void mousePressEvent(QMouseEvent *event) override
|
void mousePressEvent(QMouseEvent *event) override
|
||||||
{
|
{
|
||||||
#ifndef _MSC_VER
|
if (!indexAt(event->pos()).isValid() || !itemAt(event->pos())->data(Qt::UserRole).isValid())
|
||||||
#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
|
|
||||||
{
|
{
|
||||||
clearSelection();
|
clearSelection();
|
||||||
setCurrentItem(nullptr); // Needed for currentItemChanged
|
setCurrentItem(nullptr); // Needed for currentItemChanged
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user