forked from qt-creator/qt-creator
ProjectExplorer: Prevent inadvertant "configure" in target setup page
When the user presses the return key, this must only lead to project setup if clicking the "Configure Project" button would have been possible. Otherwise the prerequisites are not met. Change-Id: I247b9ff3a0600798667c7f95a99e7b61e7171706 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -95,8 +95,10 @@ protected:
|
||||
|
||||
void keyPressEvent(QKeyEvent *event) override
|
||||
{
|
||||
if (m_targetSetupPage && m_targetSetupPage->importLineEditHasFocus())
|
||||
if ((m_targetSetupPage && m_targetSetupPage->importLineEditHasFocus())
|
||||
|| (m_configureButton && !m_configureButton->isEnabled())) {
|
||||
return;
|
||||
}
|
||||
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) {
|
||||
event->accept();
|
||||
if (m_targetSetupPage)
|
||||
|
Reference in New Issue
Block a user