From f0a64720c882311841945604b9612049ab08a747 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 20 Apr 2010 10:13:17 +0200 Subject: [PATCH] Designer: Fix accidental widget deletion by pressing Delete in PropEditor. --- src/plugins/designer/formeditorw.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 94eeaea14a5..67278084c34 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -426,9 +426,10 @@ void FormEditorW::setupActions() bindShortcut(am->registerAction(m_actionPrint, Core::Constants::PRINT, m_contexts), m_actionPrint); connect(m_actionPrint, SIGNAL(triggered()), this, SLOT(print())); - //'delete' action + //'delete' action. Do not set a shortcut as Designer handles + // the 'Delete' key by event filter. Setting a shortcut triggers + // buggy behaviour on Mac (Pressing Delete in QLineEdit removing the widget). command = am->registerAction(m_fwm->actionDelete(), QLatin1String("FormEditor.Edit.Delete"), m_contexts); - command->setDefaultKeySequence(QKeySequence::Delete); bindShortcut(command, m_fwm->actionDelete()); command->setAttribute(Core::Command::CA_Hide); medit->addAction(command, Core::Constants::G_EDIT_COPYPASTE);