Commit f978f6a5 authored by Daniel Teske's avatar Daniel Teske
Browse files

Custom Executable RunConfiguration: Esc should close dialog



Change-Id: Ifaa4d87c73d2597a018d867f3c081113132e76ee
Task-number: QTCREATORBUG-14202
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
parent 763c4267
......@@ -115,6 +115,8 @@ public:
void accept();
bool event(QEvent *event);
private slots:
void changed()
{
......@@ -157,6 +159,18 @@ void CustomExecutableDialog::accept()
QDialog::accept();
}
bool CustomExecutableDialog::event(QEvent *event)
{
if (event->type() == QEvent::ShortcutOverride) {
QKeyEvent *ke = static_cast<QKeyEvent *>(event);
if (ke->key() == Qt::Key_Escape && !ke->modifiers()) {
ke->accept();
return true;
}
}
return QDialog::event(event);
}
// CustomExecutableRunConfiguration
RunConfiguration::ConfigurationState CustomExecutableRunConfiguration::ensureConfigured(QString *errorMessage)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment