mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-22 23:49:50 +00:00
Qt: add fallback path for older versions
This commit is contained in:
parent
132faf3bf2
commit
dd2e73d664
@ -199,6 +199,11 @@ TableWidget::TableWidget(QWidget *parent) :
|
||||
{
|
||||
}
|
||||
|
||||
bool TableWidget::isEditorOpen()
|
||||
{
|
||||
return (state() == QAbstractItemView::EditingState);
|
||||
}
|
||||
|
||||
void TableWidget::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)
|
||||
@ -1587,8 +1592,13 @@ QTabWidget* MainWindow::browserAndPlaylistTabWidget()
|
||||
|
||||
void MainWindow::onTableWidgetEnterPressed()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
/* entry is being renamed, ignore this enter press */
|
||||
if (m_tableWidget->isPersistentEditorOpen(m_tableWidget->currentIndex()))
|
||||
#else
|
||||
/* we can only check if any editor at all is open */
|
||||
if (m_tableWidget->isEditorOpen())
|
||||
#endif
|
||||
return;
|
||||
onRunClicked();
|
||||
}
|
||||
|
@ -169,6 +169,7 @@ class TableWidget : public QTableWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
TableWidget(QWidget *parent = 0);
|
||||
bool isEditorOpen();
|
||||
signals:
|
||||
void enterPressed();
|
||||
void deletePressed();
|
||||
|
Loading…
Reference in New Issue
Block a user